split malloc_os and friends further into

• functions called by mksh’s grouping memory allocator
• functions called by mksh code itself

the latter may be changed to call the internal grouping allocator,
if a porter so desires (but if this were recommended, the code in
question would already do so, so…)
This commit is contained in:
tg
2011-03-05 21:48:09 +00:00
parent 0b6afea352
commit f3dbbe3f0c
3 changed files with 18 additions and 13 deletions

View File

@ -38,7 +38,7 @@
#endif
#endif
__RCSID("$MirOS: src/bin/mksh/funcs.c,v 1.173 2011/03/05 21:43:15 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/funcs.c,v 1.174 2011/03/05 21:48:08 tg Exp $");
#if HAVE_KILLPG
/*
@ -3605,7 +3605,7 @@ c_cat(const char **wp)
char *buf, *cp;
#define MKSH_CAT_BUFSIZ 4096
if ((buf = malloc_os(MKSH_CAT_BUFSIZ)) == NULL) {
if ((buf = malloc_osfunc(MKSH_CAT_BUFSIZ)) == NULL) {
bi_errorf(T_oomem, (unsigned long)MKSH_CAT_BUFSIZ);
return (1);
}
@ -3674,7 +3674,7 @@ c_cat(const char **wp)
} while (*wp);
out:
free_osmalloc(buf);
free_osfunc(buf);
return (rv);
}