File: Alloc.c

package info (click to toggle)
libconvert-binary-c-perl 0.86-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 13,264 kB
  • sloc: ansic: 47,836; perl: 4,980; yacc: 2,143; makefile: 61
file content (15 lines) | stat: -rw-r--r-- 375 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include <stdio.h>
#include "memalloc.h"

void main( void )
{
  void *p;

  SetDebugMemAlloc( printf, DB_MEMALLOC_TRACE
                          | DB_MEMALLOC_ASSERT );

  p = Alloc( 16 );      // allocate 16 bytes of memory
  AssertValidPtr( p );  // check the pointer
  Free( p );            // free the memory block
  AssertValidPtr( p );  // check the pointer (again)
}