1 /* Problem with inverting constants
10 typedef struct _HeapEntry HeapEntry
;
11 typedef unsigned int UINT
;
20 static UINT
_getSize1(HeapEntry
*pEnt
)
22 return pEnt
->uSize
& ~USEDFLAG
;
25 static UINT
_getSize2(HeapEntry
*pEnt
)
27 return pEnt
->uSize
& ~1;
30 static UINT
_getSize3(HeapEntry
*pEnt
)
32 return pEnt
->uSize
& 0xFFFE;
41 ASSERT(_getSize1(&ent
) == 122);
42 ASSERT(_getSize2(&ent
) == 122);
43 ASSERT(_getSize3(&ent
) == 122);
46 ASSERT(_getSize1(&ent
) == 0x1234);
47 ASSERT(_getSize2(&ent
) == 0x1234);
48 ASSERT(_getSize3(&ent
) == 0x1234);