Deleted Added
full compact
zalloc_malloc.c (100394) zalloc_malloc.c (124570)
1/*
2 * This module derived from code donated to the FreeBSD Project by
3 * Matthew Dillon <dillon@backplane.com>
4 *
5 * Copyright (c) 1998 The FreeBSD Project
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 14 unchanged lines hidden (view full) ---

23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 */
29
30#include <sys/cdefs.h>
1/*
2 * This module derived from code donated to the FreeBSD Project by
3 * Matthew Dillon <dillon@backplane.com>
4 *
5 * Copyright (c) 1998 The FreeBSD Project
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 14 unchanged lines hidden (view full) ---

23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 */
29
30#include <sys/cdefs.h>
31__FBSDID("$FreeBSD: head/lib/libstand/zalloc_malloc.c 100394 2002-07-20 04:18:20Z peter $");
31__FBSDID("$FreeBSD: head/lib/libstand/zalloc_malloc.c 124570 2004-01-15 18:35:32Z jhb $");
32
33/*
34 * MALLOC.C - malloc equivalent, runs on top of zalloc and uses sbrk
35 */
36
37#include "zalloc_defs.h"
38
39static MemPool MallocPool;

--- 64 unchanged lines hidden (view full) ---

104 if (file == NULL)
105 file = "unknown";
106#ifdef USEGUARD
107 if (res->ga_Magic == GAFREE) {
108 printf("free: duplicate free @ %p from %s:%d\n", ptr, file, line);
109 return;
110 }
111 if (res->ga_Magic != GAMAGIC)
32
33/*
34 * MALLOC.C - malloc equivalent, runs on top of zalloc and uses sbrk
35 */
36
37#include "zalloc_defs.h"
38
39static MemPool MallocPool;

--- 64 unchanged lines hidden (view full) ---

104 if (file == NULL)
105 file = "unknown";
106#ifdef USEGUARD
107 if (res->ga_Magic == GAFREE) {
108 printf("free: duplicate free @ %p from %s:%d\n", ptr, file, line);
109 return;
110 }
111 if (res->ga_Magic != GAMAGIC)
112 panic("free: guard1 fail @ %p from %s:%p", ptr, file, line);
112 panic("free: guard1 fail @ %p from %s:%d", ptr, file, line);
113 res->ga_Magic = GAFREE;
114#endif
115#ifdef USEENDGUARD
116 if (*((char *)res + res->ga_Bytes - 1) == -1) {
117 printf("free: duplicate2 free @ %p from %s:%d\n", ptr, file, line);
118 return;
119 }
120 if (*((char *)res + res->ga_Bytes - 1) != -2)

--- 88 unchanged lines hidden ---
113 res->ga_Magic = GAFREE;
114#endif
115#ifdef USEENDGUARD
116 if (*((char *)res + res->ga_Bytes - 1) == -1) {
117 printf("free: duplicate2 free @ %p from %s:%d\n", ptr, file, line);
118 return;
119 }
120 if (*((char *)res + res->ga_Bytes - 1) != -2)

--- 88 unchanged lines hidden ---