Flavio Cruz, le mar. 06 déc. 2022 00:33:08 -0500, a ecrit: > On Tue, Dec 06, 2022 at 02:10:52AM +0100, Samuel Thibault wrote: > > What do you think of that? > > I think we could just define vm_size_t as typedef of __mach_uintptr_t then > it will be unsigned int on 32 bits and unsigned long on 64 bits.
Ah, yes, that fixed things indeed. > Regarding mach_msg_type_number_t, do you know if there is a need to copy > more than 4GB using RPCs? I'm thinking "no". If e.g. writing to a device is greater than 4G it can always just loop over it (which it should be able do anyway on 32bit systems whenever the device is larger than 4G). The only need would be for an "atomic" operation over more than 4G, I don't think this would really be to be served this way. > I guess it could be useful, but servers can just paginate the data. Yes, there is no current use because data is mostly paged. > For now, we could just change some of the signatures to > use mach_msg_type_number_t instead of vm_size_t to make the interface > explicit about the limits. If we think there is a need to go beyond 4GB we > can make mach_msg_type_number_t an unsigned long on pure 64 bits. Ok, I agree on this approach. Samuel