Hi Tim,
Thanks for your informations, it's very helpful :)
Tim Ellison wrote:
Regis wrote:
Tony Wu wrote:
I think so. since we already have the OSMemoryWin32 and
OSMemoryLinux32.c for the different implementation.
Thanks your reminder, I just noticed that :)
So in my understanding, the platform dependent code should be placed in
OSMemoryWin32/OSMemoryLinux32, others should be moved to "shared"
directory, right?
Yes, that is right.
FYI
On 64-bit platforms we use the full range of jlong to hold the allocated
memory pointer, but on 32-bit platforms we only use half of it.
The extra cast ((void *) ((IDATA) address)) is to ensure that the
address value is first cast to an int the right width for a platform
pointer, or else the compiler will rightly complain about the truncated
value.
When you do the merge, take the double cast version.
Regards,
Tim