- Timestamp:
- Sep 19, 2002, 11:38:27 AM (23 years ago)
- Location:
- trunk/src/odincrt
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/odincrt/malloc.cpp
r7627 r9266 1 /* $Id: malloc.cpp,v 1. 6 2001-12-13 15:32:17sandervl Exp $ */1 /* $Id: malloc.cpp,v 1.7 2002-09-19 09:38:26 sandervl Exp $ */ 2 2 /* 3 3 * Project Odin Software License can be found in LICENSE.TXT … … 33 33 *ptotalmemalloc = totalmemalloc; 34 34 } 35 36 void __cdecl new_alloc(int size) 37 { 38 nrcalls_malloc++; 39 totalmemalloc += size; 40 } 41 42 void __cdecl delete_free(void *ptr) 43 { 44 nrcalls_free++; 45 totalmemalloc -= _msize(ptr); 46 } 47 35 48 #endif 36 49 -
trunk/src/odincrt/odincrt.asm
r1925 r9266 1 ; $Id: odincrt.asm,v 1. 3 1999-12-01 18:41:46sandervl Exp $1 ; $Id: odincrt.asm,v 1.4 2002-09-19 09:38:27 sandervl Exp $ 2 2 3 3 ;/* … … 17 17 ASSUME DS:FLAT, SS:FLAT 18 18 19 IFDEF DEBUG 20 EXTRN _delete_free:NEAR 21 EXTRN _new_alloc:NEAR 22 ENDIF 19 23 PUBLIC __threadid 20 24 __threadid proc near … … 43 47 mov fs, ax 44 48 pop eax 49 IFDEF DEBUG 50 pushad 51 push eax 52 call _new_alloc 53 add esp, 4 54 popad 55 ENDIF 45 56 sub esp, 0Ch 46 57 call __nw__FUiPCcT1 … … 61 72 mov fs, ax 62 73 pop eax 74 IFDEF DEBUG 75 pushad 76 push eax 77 call _delete_free 78 add esp, 4 79 popad 80 ENDIF 63 81 sub esp, 0Ch 64 82 call __dl__FPvPCcUi
Note:
See TracChangeset
for help on using the changeset viewer.