comparison vmalloc.c @ 218:82f7defac851

Added backoff to core loop, cleaned up core loop code, cleaned comments
author Some Random Person <seanhalle@yahoo.com>
date Sat, 10 Mar 2012 21:48:53 -0800
parents 0c83ea8adefc
children c88ce1db91ef
comparison
equal deleted inserted replaced
38:b8325aedd0f2 39:eeb5467a73d4
258 */ 258 */
259 void 259 void
260 VMS_int__free( void *ptrToFree ) 260 VMS_int__free( void *ptrToFree )
261 { 261 {
262 262
263 //============================= MEASUREMENT STUFF ======================== 263 MEAS__Capture_Pre_Free_Point;
264 #ifdef MEAS__TIME_MALLOC 264
265 int32 startStamp, endStamp;
266 saveLowTimeStampCountInto( startStamp );
267 #endif
268 //========================================================================
269
270 MallocArrays* freeLists = _VMSMasterEnv->freeLists; 265 MallocArrays* freeLists = _VMSMasterEnv->freeLists;
271 MallocProlog *chunkToFree = (MallocProlog*)ptrToFree - 1; 266 MallocProlog *chunkToFree = (MallocProlog*)ptrToFree - 1;
272 uint32 containerIdx; 267 uint32 containerIdx;
273 268
274 //Check for free neighbors 269 //Check for free neighbors
305 freeLists->bigChunksSearchVector[0] |= (uint64)1 << containerIdx; 300 freeLists->bigChunksSearchVector[0] |= (uint64)1 << containerIdx;
306 else 301 else
307 freeLists->bigChunksSearchVector[1] |= (uint64)1 << (containerIdx-64); 302 freeLists->bigChunksSearchVector[1] |= (uint64)1 << (containerIdx-64);
308 } 303 }
309 304
310 //============================= MEASUREMENT STUFF ======================== 305 MEAS__Capture_Post_Free_Point;
311 #ifdef MEAS__TIME_MALLOC
312 saveLowTimeStampCountInto( endStamp );
313 addIntervalToHist( startStamp, endStamp, _VMSMasterEnv->freeTimeHist );
314 #endif
315 //========================================================================
316
317 } 306 }
318 307
319 /* 308 /*
320 * Designed to be called from the main thread outside of VMS, during init 309 * Designed to be called from the main thread outside of VMS, during init
321 */ 310 */