Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  1.  
  2. void *malloc(size_t size)
  3. {
  4.     void  *val;
  5.     __asm__ __volatile__(
  6.     "int $0x40"
  7.     :"=a"(val)
  8.     :"a"(68),"b"(12),"c"(size));
  9.     return val;
  10. }
  11.  
  12. int free(void *mem)
  13. {
  14.     int  val;
  15.     __asm__ __volatile__(
  16.     "int $0x40"
  17.     :"=a"(val)
  18.     :"a"(68),"b"(13),"c"(mem));
  19.     return val;
  20. }
  21.  
  22. void* realloc(void *mem, size_t size)
  23. {
  24.     void *val;
  25.     __asm__ __volatile__(
  26.     "int $0x40"
  27.     :"=a"(val)
  28.     :"a"(68),"b"(20),"c"(size),"d"(mem)
  29.     :"memory");
  30.  
  31.     return val;
  32. };