how calculate size of memory that allocated from create specific windows object e.g. how memory allocated when createsemaphore API is called? there are any document that describe for all objects?
closed as unclear what you're asking by Guntram Blohm, 0xec, perror, peter ferrie, jvoisin Apr 27 '16 at 20:58
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
The allocation for most executive objects (like semaphores) is done inside the
ObCreateObject() function. As you can see in
ObCreateObject()'s prototype, one of the parameters is
So the easiest way to answer your question is to set a breakpoint on
ObCreateObject() and examine the value of
ObjectSizeToAllocate when it's called to create your object of interest.