mtrebi / memory-allocators

Custom memory allocators in C++ to improve the performance of dynamic memory allocation
MIT License
1.75k stars 160 forks source link

Can't compile the code. #3

Closed maxtongwang closed 6 years ago

maxtongwang commented 6 years ago

First of all thanks for such a good example and comparison of how memory allocator works.

Sadly, after I followed the instruction and compiled it in VS, compiler told me I can't use "void* address [m_nOperations]" since m_nOperations is not a constant. How did you get it work?

maxtongwang commented 6 years ago

gzito's fork refractored for VS on Windows.

mtrebi commented 6 years ago

Hey! Sorry I did the project on Linux and later I added the instructions to generate the project files with CMake. I didn´t take into account differences in the compilers and system libraries. I'll fix it whenever I have some free time. But, as you said, Gzito seems to be doing a good job ;)

maxtongwang commented 6 years ago

@mtrebi I can compile the code successfully now thanks to Gzito's version :P! Are you going to write Red Black tree version at some point?

mtrebi commented 6 years ago

Yes. I did this project as a tutorial for me (and others) but I am planning to re-write everything and conver this into a lightweight header-only library that could be easily used in any project. This means, better compatibility, exception checking, red-black trees and overall improved performance...However, I am really busy with other projects right now so this should wait...