Changeset 455 for trunk/src


Ignore:
Timestamp:
Aug 9, 1999, 10:52:59 PM (26 years ago)
Author:
phaller
Message:

Add: debug_memory support

Location:
trunk/src/odincrt
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/odincrt/odincrt.cpp

    r441 r455  
    6464  ODIN_TEB_ON0()
    6565
     66void * ODINAPI  ODIN_debug_calloc ( size_t s1, size_t s2, const char *p1, size_t s3)
     67  ODIN_TEB_OFF
     68  void* rc =  _debug_calloc(s1,s2,p1,s3);
     69  ODIN_TEB_ON1(rc)
     70
     71void   ODINAPI  ODIN_debug_free   ( void *p1, const char *p2, size_t s1)
     72  ODIN_TEB_OFF
     73  _debug_free(p1,p2,s1);
     74  ODIN_TEB_ON0()
     75
     76void * ODINAPI  ODIN_debug_malloc ( size_t s1, const char * p1, size_t s2)
     77  ODIN_TEB_OFF
     78  void *rc = _debug_malloc(s1,p1,s2);
     79  ODIN_TEB_ON1(rc)
     80
     81void * ODINAPI  ODIN_debug_realloc( void *p1, size_t s1, const char *p2, size_t s2)
     82  ODIN_TEB_OFF
     83  void* rc = _debug_realloc(p1,s1,p2,s2);
     84  ODIN_TEB_ON1(rc)
    6685
    6786
  • trunk/src/odincrt/odincrt.def

    r452 r455  
    1010
    1111EXPORTS
    12        ODIN_calloc             = ODIN_calloc
     12       ODIN_calloc
    1313       calloc                  = ODIN_calloc
    1414
    15        ODIN_realloc            = ODIN_realloc
     15       ODIN_realloc
    1616       realloc                 = ODIN_realloc
    1717
    18        ODIN_malloc             = ODIN_malloc
     18       ODIN_malloc
    1919       malloc                  = ODIN_malloc
    2020
    21        ODIN_free               = ODIN_free
     21       ODIN_free
    2222       free                    = ODIN_free
    2323
     24       ODIN_debug_calloc
     25       _debug_calloc           = ODIN_debug_calloc
     26
     27       ODIN_debug_realloc
     28       _debug_realloc          = ODIN_debug_realloc
     29
     30       ODIN_debug_malloc
     31       _debug_malloc           = ODIN_debug_malloc
     32
     33       ODIN_debug_free
     34       _debug_free             = ODIN_debug_free
    2435
    2536
     
    131142   __cputs                   ;  16 bit function
    132143   _ddused
    133    _debug_calloc
    134    _debug_free
    135144   _debug_heapmin
    136    _debug_malloc
    137    _debug_realloc
    138145   _dposqnan
    139146   _dump_allocated
  • trunk/src/odincrt/odincrt.h

    r441 r455  
    1 /* $Id: odincrt.h,v 1.2 1999-08-09 12:39:30 phaller Exp $ */
     1/* $Id: odincrt.h,v 1.3 1999-08-09 20:52:59 phaller Exp $ */
    22
    33/*
     
    3030 ****************************************************************************/
    3131
    32 #define ODINAPI _Export
     32#define ODINAPI _Export _Optlink
    3333typedef unsigned short USHORT;
     34
     35/****************************************************************************
     36 * Internal Prototypes                                                      *
     37 ****************************************************************************/
     38
     39void * _debug_calloc ( size_t, size_t, const char *, size_t );
     40void   _debug_free   ( void *, const char *, size_t );
     41void * _debug_malloc ( size_t, const char *, size_t );
     42void * _debug_realloc( void *, size_t, const char *, size_t );
    3443
    3544
    3645/****************************************************************************
    37  * Prototypes                                                               *
     46 * External Prototypes                                                      *
    3847 ****************************************************************************/
    3948
     
    4352USHORT _System SetReturnFS(USHORT selector);
    4453
    45 void * ODINAPI  ODIN_calloc ( size_t, size_t );
    46 void   ODINAPI  ODIN_free   ( void * );
    47 void * ODINAPI  ODIN_malloc ( size_t );
    48 void * ODINAPI  ODIN_realloc( void *, size_t );
     54void * ODINAPI  ODIN_calloc       ( size_t, size_t );
     55void   ODINAPI  ODIN_free         ( void * );
     56void * ODINAPI  ODIN_malloc       ( size_t );
     57void * ODINAPI  ODIN_realloc      ( void *, size_t );
     58void * ODINAPI  ODIN_debug_calloc ( size_t, size_t, const char *, size_t );
     59void   ODINAPI  ODIN_debug_free   ( void *, const char *, size_t );
     60void * ODINAPI  ODIN_debug_malloc ( size_t, const char *, size_t );
     61void * ODINAPI  ODIN_debug_realloc( void *, size_t, const char *, size_t );
    4962
    50 char*  ODINAPI  ODIN_strdup ( const char * );
     63
     64char*  ODINAPI  ODIN_strdup       ( const char * );
    5165
    5266
Note: See TracChangeset for help on using the changeset viewer.