Skip to content

Commit

Permalink
Fix C4291 on compiler/codegen/GCStackMap.hpp
Browse files Browse the repository at this point in the history
The following warning was fixed:

warning C4291: 'void *TR_GCStackMap::operator
new(::size_t,TR_HeapMemory,uint32_t)': no matching
operator delete found; memory will not be freed if
initialization throws an exception.

Signed-off-by: Pavel Samolysov <[email protected]>
  • Loading branch information
samolisov committed May 28, 2018
1 parent 439ce76 commit 77c09d4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions compiler/codegen/GCStackMap.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,11 @@ class TR_GCStackMap
return m.allocate(s);
}

void operator delete(void *gcStackMap, TR_HeapMemory m, uint32_t numberOfSlotsToMap)
{
m.deallocate(gcStackMap);
}

void allocateLiveMonitorBits(TR_Memory * m)
{
_liveMonitorBits = (uint8_t *)m->allocateHeapMemory(getMapSizeInBytes());
Expand Down

0 comments on commit 77c09d4

Please sign in to comment.