Example #1
0
char *__ckd_salloc__ (const char *orig, const char *caller_file, int32 caller_line)
{
    int32 len;
    char *buf;

    len = strlen(orig)+1;
    buf = (char *) __ckd_malloc__(len, caller_file, caller_line);

    strcpy (buf, orig);
    return (buf);
}
Example #2
0
char *__ckd_salloc__ (char *orig, char *caller_file, int32 caller_line)
{
    int32 len = strlen(orig)+1;
    char *buf;

    buf = (char *) __ckd_malloc__(len, caller_file, caller_line);

#if defined(MEM_DEBUG)
    printf ("ckd_salloc from %s(%d): %08x %d = %08x\n",
            caller_file, caller_line, orig, len, buf);
    fflush (stdout);
#endif

    strcpy (buf, orig);
    return (buf);
}