powerlang / egg

Egg Smalltalk
https://eggsmalltalk.org
MIT License
16 stars 3 forks source link

C++ VM allocation needs fixing in MacOS #101

Open melkyades opened 1 week ago

melkyades commented 1 week ago

In egg native, behavior field in header is 32 bits, even in 64-bit platforms. This means it is only possible to point behaviors in the first 4GB of addressing space.

For that reason, the allocator only allows mmapping in the first 4gb zone for now.

The problem is that in MacOS the lowest 4gb address are not available (couldn't find any doc to link), so we need to make the allocator just use some other 4gb "page" and when reading/writing the behaviors add/remove a higher 32-bit tag to the address.

melkyades commented 1 week ago

There's a branch/pr for this #102