How to track memory allocation for a certain class?
I understand I can provide a custom allocator for most of the stl containers. If I record memory allocations in this custom allocator, then I can keep track of memory allocations. For example, with the help of MyAllocator in std::vector<T, MyAllocator<T>>
, we can alway tell how much memory is consumed by this vector.
C shrink dynamicly allocated struct to single element in struct
While optimizing my code, I noticed that I was calling malloc too frequently. Specifically, I was freeing a struct and then reallocating the same element, that in the struct that I free, with the same values.
How to turn BaseAddress and offset to address
im coding a simple cheat for assault cube, and i got the Health offset (0x0EC) and the base address (0x0) and i need to grab them both and turn into an address (health address for later on WriteProccessMemory), how can i do that