View Issue Details

IDProjectCategoryView StatusLast Update
00027592 - Next Dev List (Holding Area)Maintenancepublic2020-07-02 02:11
ReporterK7ZCZAssigned ToK7ZCZ 
Status assignedResolutionopen 
Summary0002759: Cleanup: remove use of bogus xmalloc / xfree macros
Several applications declare and use macros for memory management, like this:

#define xmalloc(s) (LPBYTE)HeapAlloc(GetProcessHeap(),0,(s))
#define xfree(p)   HeapFree (GetProcessHeap(),0,(LPVOID)(p))

These macros are bad for all the reasons that macros are bad -- most notably, type safety here.

More importantly, these macros aren't necessary. It's better to use new/delete or malloc/free, as they provide advanatages in debugging and performance, and are closer to C++ consturcts for sensible object (rather than memory) usage.

There is some evidecne that these macros were hacked in to work around perceived problems in the heap implementation. In fact, the issues largely surround concurrency and correctless issues in our own code.
TagsNo tags attached.
TestingNot Started



2018-09-13 16:03

developer   ~0006203

This checkin is made to the MikeB2 branch.

Once this change is merged to the main branch, the fixes will be available to test.


2018-12-11 18:22

developer   ~0006578

Some more progress here ...


2018-12-12 09:14

developer   ~0006585

A bit more progress with this checkin


2019-10-20 15:22

developer   ~0008879

Tiny progress here ...

Issue History

Date Modified Username Field Change
2018-06-03 19:24 K7ZCZ New Issue
2018-09-13 16:03 K7ZCZ Note Added: 0006203
2018-09-13 17:31 K7ZCZ Assigned To => K7ZCZ
2018-09-13 17:31 K7ZCZ Status new => assigned
2018-12-11 18:22 K7ZCZ Note Added: 0006578
2018-12-12 09:14 K7ZCZ Note Added: 0006585
2019-10-20 15:22 K7ZCZ Note Added: 0008879
2020-07-02 02:11 WA9PIE Project 3 - Current Dev List => 2 - Next Dev List (Holding Area)