File: debug.c

package info (click to toggle)
usbmgr 1.0.0-5
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 460 kB
  • ctags: 323
  • sloc: ansic: 2,118; sh: 545; makefile: 154
file content (29 lines) | stat: -rw-r--r-- 523 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/*
 *  
 *  Copyright (c) by Shuu Yamaguchi <shuu@wondernetworkresources.com>
 *
 *  $Id: debug.c,v 3.1 2000/12/01 11:01:26 shuu Exp $
 *
 *  Can be freely distributed and used under the terms of the GNU GPL.
 */
#include	<stdlib.h>
#include	<syslog.h>

void *
dmalloc(size_t sz)
{
	void *ptr;
	
	ptr = malloc(sz);
	syslog(LOG_DEBUG,"dmalloc address 0x%0x-0x%0x size %u",
		(unsigned long)ptr,(unsigned long)ptr+sz-1,sz);

	return ptr;
}

void
dfree(void *ptr)
{
	syslog(LOG_DEBUG,"dfree address 0x%0x",ptr);
	free(ptr);
}