kern_ctf.c (a18a2290cd704e9348285c150c9c6e1d9a2493ff) | kern_ctf.c (ac2fffa4b74cd83963f0d462c379c7f50eeabf20) |
---|---|
1/*- 2 * SPDX-License-Identifier: BSD-2-Clause-FreeBSD 3 * 4 * Copyright (c) 2008 John Birrell <jb@freebsd.org> 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 31 unchanged lines hidden (view full) --- 40#define CTF_HDR_STRLEN_U32 8 41 42#ifdef DDB_CTF 43static void * 44z_alloc(void *nil, u_int items, u_int size) 45{ 46 void *ptr; 47 | 1/*- 2 * SPDX-License-Identifier: BSD-2-Clause-FreeBSD 3 * 4 * Copyright (c) 2008 John Birrell <jb@freebsd.org> 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 31 unchanged lines hidden (view full) --- 40#define CTF_HDR_STRLEN_U32 8 41 42#ifdef DDB_CTF 43static void * 44z_alloc(void *nil, u_int items, u_int size) 45{ 46 void *ptr; 47 |
48 ptr = mallocarray(items, size, M_TEMP, M_NOWAIT); | 48 ptr = malloc(items * size, M_TEMP, M_NOWAIT); |
49 return ptr; 50} 51 52static void 53z_free(void *nil, void *ptr) 54{ 55 free(ptr, M_TEMP); 56} --- 270 unchanged lines hidden --- | 49 return ptr; 50} 51 52static void 53z_free(void *nil, void *ptr) 54{ 55 free(ptr, M_TEMP); 56} --- 270 unchanged lines hidden --- |