comparison VMS.c @ 101:ca154ebe2b6c

Basic malloc without small chunks
author Merten Sach <msach@mailbox.tu-berlin.de>
date Tue, 02 Aug 2011 15:44:28 +0200
parents bc31d3e070d2
children def70e32cf2c
comparison
equal deleted inserted replaced
44:6e61d15b43a6 47:5fb96ee2bf7a
103 _VMSMasterEnv = malloc( sizeof(MasterEnv) ); 103 _VMSMasterEnv = malloc( sizeof(MasterEnv) );
104 104
105 //Very first thing put into the master env is the free-list, seeded 105 //Very first thing put into the master env is the free-list, seeded
106 // with a massive initial chunk of memory. 106 // with a massive initial chunk of memory.
107 //After this, all other mallocs are VMS__malloc. 107 //After this, all other mallocs are VMS__malloc.
108 _VMSMasterEnv->freeListHead = VMS_ext__create_free_list(); 108 _VMSMasterEnv->freeLists = VMS_ext__create_free_list();
109 109
110 110
111 //============================= MEASUREMENT STUFF ======================== 111 //============================= MEASUREMENT STUFF ========================
112 #ifdef MEAS__TIME_MALLOC 112 #ifdef MEAS__TIME_MALLOC
113 _VMSMasterEnv->mallocTimeHist = makeFixedBinHistExt( 100, 0, 100, 113 _VMSMasterEnv->mallocTimeHist = makeFixedBinHistExt( 100, 0, 100,
749 freeDynArrayDeep( _VMSMasterEnv->dynIntervalProbesInfo, &VMS__free_probe); 749 freeDynArrayDeep( _VMSMasterEnv->dynIntervalProbesInfo, &VMS__free_probe);
750 #endif 750 #endif
751 //======================================================================== 751 //========================================================================
752 */ 752 */
753 //These are the only two that use system free 753 //These are the only two that use system free
754 VMS_ext__free_free_list( _VMSMasterEnv->freeListHead ); 754 VMS_ext__free_free_list( _VMSMasterEnv->freeLists );
755 free( (void *)_VMSMasterEnv ); 755 free( (void *)_VMSMasterEnv );
756 } 756 }
757 757
758 758
759 //================================ 759 //================================