]> git.saurik.com Git - apple/boot.git/blame - gen/libsa/malloc.c.00
boot-80.1.tar.gz
[apple/boot.git] / gen / libsa / malloc.c.00
CommitLineData
14c7c974
A
1/*
2 * Copyright 1993 NeXT, Inc.
3 * All rights reserved.
4 *
5 * Malloc interface to zalloc.
6 */
7
8#import "libsa.h"
9
10int
11malloc_init(
12 char *start,
13 int size,
14 int nodes
15)
16{
17 return zinit(start,size,nodes);
18}
19
20void *malloc(size_t size)
21{
22 return zalloc(size);
23}
24
25/* This is the simplest way possible. Should fix this. */
26void *realloc(void *start, size_t newsize)
27{
28 void *newstart = zalloc(newsize);
29 bcopy(start, newstart, newsize);
30 zfree(start);
31 return newstart;
32}
33
34void free(void *start)
35{
36 (void) zfree(start);
37}