Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Fix harmless compiler warnings. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | memTests |
Files: | files | file ages | folders |
SHA1: |
a12d214ecccc5d3372dbcedc88705b00 |
User & Date: | mistachkin 2013-12-03 22:33:35.657 |
Context
2013-12-03
| ||
23:33 | Make use of the CC nmake macro even when cross-compiling (with MSVC). (Closed-Leaf check-in: aae7b30ebd user: mistachkin tags: memTests) | |
22:33 | Fix harmless compiler warnings. (check-in: a12d214ecc user: mistachkin tags: memTests) | |
22:32 | Add memory subsystem related defines to the compile-time options list. (check-in: 52a44146dd user: mistachkin tags: memTests) | |
Changes
Changes to src/mem5.c.
︙ | ︙ | |||
198 199 200 201 202 203 204 | ** Return the size of an outstanding allocation, in bytes. The ** size returned omits the 8-byte header overhead. This only ** works for chunks that are currently checked out. */ static int memsys5Size(void *p){ int iSize = 0; if( p ){ | | | 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 | ** Return the size of an outstanding allocation, in bytes. The ** size returned omits the 8-byte header overhead. This only ** works for chunks that are currently checked out. */ static int memsys5Size(void *p){ int iSize = 0; if( p ){ int i = (int)(((u8 *)p-mem5.zPool)/mem5.szAtom); assert( i>=0 && i<mem5.nBlock ); iSize = mem5.szAtom * (1 << (mem5.aCtrl[i]&CTRL_LOGSIZE)); } return iSize; } /* |
︙ | ︙ | |||
285 286 287 288 289 290 291 | static void memsys5FreeUnsafe(void *pOld){ u32 size, iLogsize; int iBlock; /* Set iBlock to the index of the block pointed to by pOld in ** the array of mem5.szAtom byte blocks pointed to by mem5.zPool. */ | | | 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 | static void memsys5FreeUnsafe(void *pOld){ u32 size, iLogsize; int iBlock; /* Set iBlock to the index of the block pointed to by pOld in ** the array of mem5.szAtom byte blocks pointed to by mem5.zPool. */ iBlock = (int)(((u8 *)pOld-mem5.zPool)/mem5.szAtom); /* Check that the pointer pOld points to a valid, non-free block. */ assert( iBlock>=0 && iBlock<mem5.nBlock ); assert( ((u8 *)pOld-mem5.zPool)%mem5.szAtom==0 ); assert( (mem5.aCtrl[iBlock] & CTRL_FREE)==0 ); iLogsize = mem5.aCtrl[iBlock] & CTRL_LOGSIZE; |
︙ | ︙ |