siz = (nbytes+sizeof(struct hdr)+(WORD-1))/WORD*WORD;
if (siz<EPSILON) siz = EPSILON;
segbytes = ((siz+2*EPSILON+(SEGGRAIN-1))
/ SEGGRAIN) * SEGGRAIN;
#if !defined(AIXrt)
getrlimit (RLIMIT_DATA, &rlp);
if ((int)sbrk(0)+segbytes > etext+rlp.rlim_max)
sprintf(buf, "Malloc abort. Attempt to allocate %d bytes caused data segment to exceed its maximum of %d bytes.\n",
nbytes, rlp.rlim_max);
#else
if ((int) (oldBrk = (char *) sbrk(0))+segbytes > maxBrk )
sprintf(buf, "Malloc abort. Attempt to allocate %d bytes caused data segment to exceed its maximum of %d bytes.\n",
nbytes, maxBrk - oldBrk );
#endif
else
sprintf(buf, "Malloc abort. Attempt to allocate %d bytes would cause data segment (now having %d bytes) to exceed the currently available swap space.\n",