r-lyeh-archived / ltalloc

LightweighT Almost Lock-Less Oriented for C++ programs memory allocator
BSD 3-Clause "New" or "Revised" License
164 stars 17 forks source link

Clean macros #21

Closed jlaumon closed 6 years ago

jlaumon commented 6 years ago

The diff a is little bit messy because I moved a lot of stuff around, but here is the gist of it:

This was a lot harder to do than I expected 😅, especially the parts with the virtual memory functions. But I'm pretty happy with the result, it should be very easy to port to new platforms now.

The main macros are: LTALLOC_VMALLOC, LTALLOC_VMFREE, and LTALLOC_VMALLOC_MIN_SIZE. If the plaform supports it, there are two more macros that you can define:

r-lyeh commented 6 years ago

I am sure all the changes were done with good intentions but haven't checked all of them :) thanks!