long xmalloc(long amount) { if( run->p_flags & PF_TTRAMMEM ) { /* allocate TT RAM, or ST RAM if not enough TT RAM */ return xmxalloc(amount, MX_PREFTTRAM); } else { /* allocate only ST RAM */ return xmxalloc(amount, MX_STRAM); } }
/* * xmalloc - Function 0x48 (Malloc) */ void *xmalloc(long amount) { void *rc; if (run->p_flags & PF_TTRAMMEM) { /* allocate TT RAM, or ST RAM if not enough TT RAM */ rc = xmxalloc(amount, MX_PREFTTRAM); } else { /* allocate only ST RAM */ rc = xmxalloc(amount, MX_STRAM); } KDEBUG(("BDOS: Malloc(%ld), pgmflags=0x%08lx: rc=0x%08lx\n",amount,run->p_flags,(ULONG)rc)); return rc; }