#ifdef DEBUGGING
#undef ASSERT
-#define ASSERT(p,diag) if (!(p)) botch(diag,STRINGIFY(p),__FILE__,__LINE__); else
+#define ASSERT(p,diag) if (!(p)) botch(diag,STRINGIFY(p),__FILE__,__LINE__);
+
static void
botch(char *diag, char *s, char *file, int line)
{
+ dVAR;
if (!(PERL_MAYBE_ALIVE && PERL_GET_THX))
goto do_write;
else {
Malloc_t
Perl_malloc(register size_t nbytes)
{
+ dVAR;
register union overhead *p;
register int bucket;
register MEM_SIZE shiftr;
static union overhead *
getpages(MEM_SIZE needed, int *nblksp, int bucket)
{
+ dVAR;
/* Need to do (possibly expensive) system call. Try to
optimize it for rare calling. */
MEM_SIZE require = needed - sbrked_remains;
static void
morecore(register int bucket)
{
+ dVAR;
register union overhead *ovp;
register int rnu; /* 2^rnu bytes will be requested */
int nblks; /* become nblks blocks of the desired size */
}
Free_t
-Perl_mfree(void *mp)
+Perl_mfree(Malloc_t where)
{
+ dVAR;
register MEM_SIZE size;
register union overhead *ovp;
- char *cp = (char*)mp;
+ char *cp = (char*)where;
#ifdef PACK_MALLOC
u_char bucket;
#endif
Malloc_t
Perl_realloc(void *mp, size_t nbytes)
{
+ dVAR;
register MEM_SIZE onb;
union overhead *ovp;
char *res;
MEM_SIZE l = strlen(s);
char *s1 = (char *)Perl_malloc(l+1);
- return CopyD(s, s1, (MEM_SIZE)(l+1), char);
+ return (char *)CopyD(s, s1, (MEM_SIZE)(l+1), char);
}
#ifdef PERL_CORE
if (l < sizeof(buf))
var = buf;
else
- var = Perl_malloc(l + 1);
+ var = (char *)Perl_malloc(l + 1);
Copy(a, var, l, char);
var[l + 1] = 0;
my_setenv(var, val+1);