Closed
Bug 554419
Opened 15 years ago
Closed 15 years ago
Possible address space leak in VMPI_decommitMemory()
Categories
(Tamarin Graveyard :: Garbage Collection (mmGC), defect)
Tracking
(Not tracked)
VERIFIED
INVALID
People
(Reporter: wmaddox, Assigned: wmaddox)
Details
MSVC++ static code analysis (/analyze) reports the following:
>z:\wmaddox\tr-patch\vmpi\mmgcportwin.cpp(154) : warning C6250: Calling 'VirtualFree' without the MEM_RELEASE flag might free memory but not address descriptors (VADs). This causes address space leaks
This report is based on static analysis, and does not reflect an actual observed failure.
The relevant code is appears below.
bool VMPI_decommitMemory(char *address, size_t size)
{
bool success = false;
MEMORY_BASIC_INFORMATION mbi;
do {
VirtualQuery(address, &mbi, sizeof(MEMORY_BASIC_INFORMATION));
size_t commitSize = size > mbi.RegionSize ? mbi.RegionSize : size;
success = VirtualFree(address, commitSize, MEM_DECOMMIT) == TRUE;
address += commitSize;
size -= commitSize;
} while(size > 0 && success);
return success;
}
Comment 1•15 years ago
|
||
This is by design, we reuse the address space. We also release address space from GCHeap::Decommit if we have much more than we need.
| Assignee | ||
Comment 2•15 years ago
|
||
Closed per Tommy's analysis above.
Assignee: nobody → wmaddox
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•