Rustem Gimadutdinov (rgimad)
81120905e2
git-svn-id: svn://kolibrios.org@7873 a494cfbc-eb01-0410-851d-a64ba20cac60
32 lines
516 B
C
32 lines
516 B
C
|
|
void *malloc(size_t size)
|
|
{
|
|
void *val;
|
|
__asm__ __volatile__(
|
|
"int $0x40"
|
|
:"=a"(val)
|
|
:"a"(68),"b"(12),"c"(size));
|
|
return val;
|
|
}
|
|
|
|
int free(void *mem)
|
|
{
|
|
int val;
|
|
__asm__ __volatile__(
|
|
"int $0x40"
|
|
:"=a"(val)
|
|
:"a"(68),"b"(13),"c"(mem));
|
|
return val;
|
|
}
|
|
|
|
void* realloc(void *mem, size_t size)
|
|
{
|
|
void *val;
|
|
__asm__ __volatile__(
|
|
"int $0x40"
|
|
:"=a"(val)
|
|
:"a"(68),"b"(20),"c"(size),"d"(mem)
|
|
:"memory");
|
|
|
|
return val;
|
|
}; |