发明名称 Memory allocation analysis
摘要 The subject disclosure relates to analyzing memory allocations for one or more computer-implemented processes. In particular, in conjunction with employing tags for tracking memory allocation commands, currently allocated memory can be examined for various characteristics of inefficient memory use. For example, as memory is initially allocated, a predetermined bit pattern can be written to the newly allocated memory. Thus, detection of the predetermined bit pattern can be indicative of wasted memory use. Moreover, additional features can be provided to both analyze data and present views associated with that analysis relating to identification of memory fragmentation, over-allocation, sparse memory use, duplication of allocations, multiple module loads, and so forth.
申请公布号 US8918616(B2) 申请公布日期 2014.12.23
申请号 US201113217224 申请日期 2011.08.24
申请人 Microsoft Corporation 发明人 Hsia Calvin
分类号 G06F12/00;G06F12/02;G06F3/06 主分类号 G06F12/00
代理机构 代理人 Sullivan Kevin;Drakos Kate;Minhas Micky
主权项 1. A method performed by a computing device having a processor and a memory, the method comprising: with the processor, detecting one or more requests for memory allocation from a process executed by the processor;in response to a detected request for memory allocation, allocating a portion of the memory to the process, the allocated portion of the memory including a total number of bit locations;recording and storing an instance of a call stack associated with the detected request for memory allocation; andwriting repeating instances of a bit pattern into the total number of bit locations;executing the process with the allocated portion of the memory;determining a number of bit locations still containing the bit pattern; andanalyzing usage of the allocated portion of the memory based on the determined number of bit locations still containing the bit pattern and the associated recorded instance of the call stack, wherein analyzing usage of the allocated portion of the memory includes determining an amount of unused memory space in the allocated portion of the memory based on the determined number of bit locations still containing the bit pattern.
地址 Redmond WA US