Subversion Repositories shark

Compare Revisions

Ignore whitespace Rev 228 → Rev 227

/shark/trunk/libc/stdlib/malloc.c
20,11 → 20,11
 
/**
------------
CVS : $Id: malloc.c,v 1.2 2003-09-12 10:11:27 giacomo Exp $
CVS : $Id: malloc.c,v 1.1.1.1 2002-03-29 14:12:53 pj Exp $
 
File: $File$
Revision: $Revision: 1.2 $
Last update: $Date: 2003-09-12 10:11:27 $
Revision: $Revision: 1.1.1.1 $
Last update: $Date: 2002-03-29 14:12:53 $
------------
 
malloc:
59,15 → 59,17
SYS_FLAGS f;
 
f = kern_fsave();
//kern_cli();
 
p = kern_alloc(size + sizeof(size_t));
if (!p) {
kern_frestore(f);
kern_sti();
return 0;
}
 
*((size_t *) p) = size + sizeof(size_t);
 
//kern_sti();
kern_frestore(f);
 
return p + sizeof(size_t);