uma_core.c (95923) | uma_core.c (95925) |
---|---|
1/* 2 * Copyright (c) 2002, Jeffrey Roberson <jroberson@chesapeake.net> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * | 1/* 2 * Copyright (c) 2002, Jeffrey Roberson <jroberson@chesapeake.net> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * |
26 * $FreeBSD: head/sys/vm/uma_core.c 95923 2002-05-02 07:22:19Z jeff $ | 26 * $FreeBSD: head/sys/vm/uma_core.c 95925 2002-05-02 07:36:30Z arr $ |
27 * 28 */ 29 30/* 31 * uma_core.c Implementation of the Universal Memory allocator 32 * 33 * This allocator is intended to replace the multitude of similar object caches 34 * in the standard FreeBSD kernel. The intent is to be flexible as well as --- 97 unchanged lines hidden (view full) --- 132static int maxcpu; 133 134/* 135 * This structure is passed as the zone ctor arg so that I don't have to create 136 * a special allocation function just for zones. 137 */ 138struct uma_zctor_args { 139 char *name; | 27 * 28 */ 29 30/* 31 * uma_core.c Implementation of the Universal Memory allocator 32 * 33 * This allocator is intended to replace the multitude of similar object caches 34 * in the standard FreeBSD kernel. The intent is to be flexible as well as --- 97 unchanged lines hidden (view full) --- 132static int maxcpu; 133 134/* 135 * This structure is passed as the zone ctor arg so that I don't have to create 136 * a special allocation function just for zones. 137 */ 138struct uma_zctor_args { 139 char *name; |
140 int size; | 140 size_t size; |
141 uma_ctor ctor; 142 uma_dtor dtor; 143 uma_init uminit; 144 uma_fini fini; 145 int align; 146 u_int16_t flags; 147}; 148 --- 1113 unchanged lines hidden (view full) --- 1262 callout_reset(&uma_callout, UMA_WORKING_TIME * hz, uma_timeout, NULL); 1263#ifdef UMA_DEBUG 1264 printf("UMA startup3 complete.\n"); 1265#endif 1266} 1267 1268/* See uma.h */ 1269uma_zone_t | 141 uma_ctor ctor; 142 uma_dtor dtor; 143 uma_init uminit; 144 uma_fini fini; 145 int align; 146 u_int16_t flags; 147}; 148 --- 1113 unchanged lines hidden (view full) --- 1262 callout_reset(&uma_callout, UMA_WORKING_TIME * hz, uma_timeout, NULL); 1263#ifdef UMA_DEBUG 1264 printf("UMA startup3 complete.\n"); 1265#endif 1266} 1267 1268/* See uma.h */ 1269uma_zone_t |
1270uma_zcreate(char *name, int size, uma_ctor ctor, uma_dtor dtor, uma_init uminit, 1271 uma_fini fini, int align, u_int16_t flags) | 1270uma_zcreate(char *name, size_t size, uma_ctor ctor, uma_dtor dtor, 1271 uma_init uminit, uma_fini fini, int align, u_int16_t flags) |
1272 1273{ 1274 struct uma_zctor_args args; 1275 1276 /* This stuff is essential for the zone ctor */ 1277 args.name = name; 1278 args.size = size; 1279 args.ctor = ctor; --- 779 unchanged lines hidden --- | 1272 1273{ 1274 struct uma_zctor_args args; 1275 1276 /* This stuff is essential for the zone ctor */ 1277 args.name = name; 1278 args.size = size; 1279 args.ctor = ctor; --- 779 unchanged lines hidden --- |