A tricky way of manipulating memory allocation [modified]
-
"d now there matching everything as if the object was created at the local heap" this is odd, then there is no need to allocate a heap for CRT. is all this back-compatible consideration? the original CRT developers use this mechanism for some specific reason that is rarely used today but for compatible's sake Microsoft still maintain this feature?
-
"d now there matching everything as if the object was created at the local heap" this is odd, then there is no need to allocate a heap for CRT. is all this back-compatible consideration? the original CRT developers use this mechanism for some specific reason that is rarely used today but for compatible's sake Microsoft still maintain this feature?
-
Gorgeous! The best answer i have ever got since I have started asking for help in the internet! And I spend almost an hour to chew this answer. Thanks a ton! To make sure I've understood what you are saying,are you saying if each dll's referred CRT copy's version are the same, their would be no problem creating an object in this dll and deleting in another because they use the same allocator the same allocating algorithm??
-
Gorgeous! The best answer i have ever got since I have started asking for help in the internet! And I spend almost an hour to chew this answer. Thanks a ton! To make sure I've understood what you are saying,are you saying if each dll's referred CRT copy's version are the same, their would be no problem creating an object in this dll and deleting in another because they use the same allocator the same allocating algorithm??
-
Hehe, I got it. And I'm waiting for the moment I have to allocate-deallocate memory across dll boundries in my job, before that I may be follow the rule: if you get a pointer to newly created memory by a dll, then you have to use a function in this dll and past this pointer as a parameter to it to delete( release indeed) the memory.
-
Hehe, I got it. And I'm waiting for the moment I have to allocate-deallocate memory across dll boundries in my job, before that I may be follow the rule: if you get a pointer to newly created memory by a dll, then you have to use a function in this dll and past this pointer as a parameter to it to delete( release indeed) the memory.
-
I read a lot of arctiles in heap management these days. you can goole "free lists lookaside table filetype:ppt" and there a bunch of useful infomation. I find a serious problem: 1.all mallocs and frees in different versions of CRT of Windows call the same RtlAllocateHeap(), and RtlFreeHeap(), and all infomation needed by RtlAllocateHeap,and AtlFreeHeap() was builded by ntoskrnl.exe. It seems to me that malloc and free don't need to interact with CRT. What specific info is contained in CRT, rather than process management field(PEB or sth.)?
-
I read a lot of arctiles in heap management these days. you can goole "free lists lookaside table filetype:ppt" and there a bunch of useful infomation. I find a serious problem: 1.all mallocs and frees in different versions of CRT of Windows call the same RtlAllocateHeap(), and RtlFreeHeap(), and all infomation needed by RtlAllocateHeap,and AtlFreeHeap() was builded by ntoskrnl.exe. It seems to me that malloc and free don't need to interact with CRT. What specific info is contained in CRT, rather than process management field(PEB or sth.)?
-
"A heap descriptor"? you mean "heap structures"? which contain Freelists, Lookaside Lists and the like and which reside in the front of A heap? Does CRT change the content of heap descriptor directorly or it was edited while inside RltHeapAllocate or RltFreeHeap? It seems to me the latter one is safer and more reasonable. The second question, yes, the debug and release version does contain different info of heap, because debug version want to provide more info such as heap memory leak, heap memory overflows, etc. What's the main differneces between each release versions? I discover one, which you can see in page 32 in XPSP2 Heap Exploitation.ppt( you can find this on internet, or i can send you by email) And I want to make sure that: chances are that when one copy of CRT is mapped to process memory address in DLLMain(), its own heap can be initialized. Can this happens because I saw this opinion in some articles. But you are saying there are only one heap-the default heap for each version of CRT to malloc and free. Are you sure with what you are saying?
-
"A heap descriptor"? you mean "heap structures"? which contain Freelists, Lookaside Lists and the like and which reside in the front of A heap? Does CRT change the content of heap descriptor directorly or it was edited while inside RltHeapAllocate or RltFreeHeap? It seems to me the latter one is safer and more reasonable. The second question, yes, the debug and release version does contain different info of heap, because debug version want to provide more info such as heap memory leak, heap memory overflows, etc. What's the main differneces between each release versions? I discover one, which you can see in page 32 in XPSP2 Heap Exploitation.ppt( you can find this on internet, or i can send you by email) And I want to make sure that: chances are that when one copy of CRT is mapped to process memory address in DLLMain(), its own heap can be initialized. Can this happens because I saw this opinion in some articles. But you are saying there are only one heap-the default heap for each version of CRT to malloc and free. Are you sure with what you are saying?
Shall we talk on MSN? my MSN is dingxiaofenguni@gmail.com