2N/A * The contents of this file are subject to the terms of the 2N/A * Common Development and Distribution License, Version 1.0 only 2N/A * (the "License"). You may not use this file except in compliance 2N/A * See the License for the specific language governing permissions 2N/A * and limitations under the License. 2N/A * When distributing Covered Code, include this CDDL HEADER in each 2N/A * If applicable, add the following below this CDDL HEADER, with the 2N/A * fields enclosed by brackets "[]" replaced with your own identifying 2N/A * information: Portions Copyright [yyyy] [name of copyright owner] 2N/A * Copyright 2004 Sun Microsystems, Inc. All rights reserved. 2N/A * Use is subject to license terms. 2N/A#
pragma ident "%Z%%M% %I% %E% SMI" 2N/A * Standalone-specific vmem routines 2N/A * The standalone allocator operates on a pre-existing blob of memory, the 2N/A * location and dimensions of which are set using vmem_stand_setsize(). We 2N/A * then hand out CHUNKSIZE-sized pieces of this blob, until we run out. 2N/A return (-
1);
/* we don't have room -- throw it back */ 2N/A * We guarantee that only one call to `vmem_stand_add' will be 2N/A * active at a time, but we can't ensure that the allocator won't be 2N/A * in use while this function is being called. As such, we have to 2N/A * ensure that sr is populated and visible to other processors before 2N/A * allowing the allocator to access the new region. 2N/A /* We need to allocate another chunk */ 2N/A * We don't have enough in any of our regions to satisfy the