ARMA2 Bohemia Interactive's memory allocation library documentation

Hexui Undetected CSGO Cheats Sinkicheat PUBG Cheat

c5

Kim Kong Trasher
Dank Tier VIP
Dank Tier Donator
Jul 19, 2012
1,187
12,638
76
tbb4malloc_bi.dll hand reversed documentation.

Since a numerous of people have started to spawn items on arma 2 oa by writing structures to the memory, here is the most efficient way to do so with the help of the memory allocation library the game itself uses.

It's a small documentatation I compiled during reversing bohemia interactives memory allocation library. They use that for most of the memory management they do in their games.
I dont know if there are other versions of this around, but this is what I had with my arma 2 oa installation. This is incomplete, if you find any type faults, feel free to reply.

Here are the exports the dll hands out to you



And here is a closer look on some of them:

void* __stdcall MemAlloc(unsigned int sizeToAllocate)

takes the size of memory to allocate in bytes as an argument
returns the pointer to the allocated memory region


void __stdcall MemFree(void* regionToFree)

takes the pointer to the allocated memory region as an argument
deallocates the memory


int __stdcall MemSize(void* region)

takes the pointer to the allocated memory region as an argument
returns the size of the allocated memory region


unsigned int __stdcall MemTotalComitted()

returns the amount of bytes the allocator has reserved


unsigned int __stdcall MemTotalReserved()

returns the amount of bytes the allocator has reserved


int __stdcall MemFlushCacheAll()

flushes the caches used by the allocator


The rest of the exported functions seem quite irrelevant because you can probably do all you need with the ones mentione above.
Arma 2 oa doesnt seem to be using the other ones anyways.l
 

NTvalk

Hacker
Meme Tier VIP
Jul 6, 2013
499
3,108
8
So how does this work exactly? you allocate a structure to the memory but i dont see how it makes stuff spawn..
 

c5

Kim Kong Trasher
Dank Tier VIP
Dank Tier Donator
Jul 19, 2012
1,187
12,638
76
So how does this work exactly? you allocate a structure to the memory but i dont see how it makes stuff spawn..
You use that to allocate a block of memory so it won't get wiped by the allocator. People where going wrong when they allocated memory with regular allocators from windows api but the game's allocator wiped those blocks since there were no references to the games allocator from them.

Spawning the stuff itself is not the scope of this topic.
 

NTvalk

Hacker
Meme Tier VIP
Jul 6, 2013
499
3,108
8
You use that to allocate a block of memory so it won't get wiped by the allocator. People where going wrong when they allocated memory with regular allocators from windows api but the game's allocator wiped those blocks since there were no references to the games allocator from them.

Spawning the stuff itself is not the scope of this topic.
Ahh i see, thanks and GZ on 1k posts :smile:
 
Attention! Before you post:

Read the How to Ask Questions Guide
99% of questions are answered in the Beginner's Guide, do it before asking a question.

No Hack Requests. Post in the correct section.  Search the forum first. Read the rules.

How to make a good post:

  • Fill out the form correctly
  • Tell us the game name & coding language
  • Post everything we need to know to help you
  • Ask specific questions, be descriptive
  • Post errors, line numbers & screenshots
  • Post code snippets using code tags
  • If it's a large project, zip it up and attach it

If you do not comply, your post may be deleted.  We want to help, please make a good post and we will do our best to help you.

Community Mods