bug fix in getarea/freearea
This commit is contained in:
parent
6fc7d0f866
commit
28bbb40835
|
@ -49,6 +49,7 @@ area_t getarea(size) unsigned size ; {
|
||||||
unsigned rqsize ;
|
unsigned rqsize ;
|
||||||
char *malloc() ;
|
char *malloc() ;
|
||||||
|
|
||||||
|
size = ((size + (sizeof(short) - 1)) / sizeof(short)) * sizeof(short);
|
||||||
#ifdef MEMUSE
|
#ifdef MEMUSE
|
||||||
m_used += size ;
|
m_used += size ;
|
||||||
m_free -= size ;
|
m_free -= size ;
|
||||||
|
@ -87,6 +88,7 @@ area_t getarea(size) unsigned size ; {
|
||||||
freearea(ptr,size) register area_t ptr ; unsigned size ; {
|
freearea(ptr,size) register area_t ptr ; unsigned size ; {
|
||||||
register struct freeblock *c_ptr, *l_ptr ;
|
register struct freeblock *c_ptr, *l_ptr ;
|
||||||
|
|
||||||
|
size = ((size + (sizeof(short) - 1)) / sizeof(short)) * sizeof(short);
|
||||||
#ifdef MEMUSE
|
#ifdef MEMUSE
|
||||||
m_free += size ;
|
m_free += size ;
|
||||||
m_used -= size ;
|
m_used -= size ;
|
||||||
|
|
Loading…
Reference in a new issue