main
|
Last change
on this file was ea777aa, checked in by Alex Wilton <awilton@…>, 3 years ago |
|
Moved examples, include, build_default.properties, common.xml, and README out from dev.civl.com into the root of the repo.
git-svn-id: svn://vsl.cis.udel.edu/civl/trunk@5704 fb995dde-84ed-4084-dfe6-e5aef3e2452c
|
-
Property mode
set to
100644
|
|
File size:
1.0 KB
|
| Line | |
|---|
| 1 | /*BHEADER**********************************************************************
|
|---|
| 2 | * Copyright (c) 2008, Lawrence Livermore National Security, LLC.
|
|---|
| 3 | * Produced at the Lawrence Livermore National Laboratory.
|
|---|
| 4 | * This file is part of HYPRE. See file COPYRIGHT for details.
|
|---|
| 5 | *
|
|---|
| 6 | * HYPRE is free software; you can redistribute it and/or modify it under the
|
|---|
| 7 | * terms of the GNU Lesser General Public License (as published by the Free
|
|---|
| 8 | * Software Foundation) version 2.1 dated February 1999.
|
|---|
| 9 | *
|
|---|
| 10 | * $Revision: 2.4 $
|
|---|
| 11 | ***********************************************************************EHEADER*/
|
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 | #ifdef HYPRE_USE_UMALLOC
|
|---|
| 15 | #include "umalloc_local.h"
|
|---|
| 16 |
|
|---|
| 17 |
|
|---|
| 18 | void *_uget_fn(Heap_t usrheap, size_t *length, int *clean)
|
|---|
| 19 | {
|
|---|
| 20 | void *p;
|
|---|
| 21 |
|
|---|
| 22 | *length = ((*length) / INITIAL_HEAP_SIZE) * INITIAL_HEAP_SIZE
|
|---|
| 23 | + INITIAL_HEAP_SIZE;
|
|---|
| 24 |
|
|---|
| 25 | *clean = _BLOCK_CLEAN;
|
|---|
| 26 | p = (void *) calloc(*length, 1);
|
|---|
| 27 | return p;
|
|---|
| 28 | }
|
|---|
| 29 |
|
|---|
| 30 | void _urelease_fn(Heap_t usrheap, void *p, size_t size)
|
|---|
| 31 | {
|
|---|
| 32 | free (p);
|
|---|
| 33 | return;
|
|---|
| 34 | }
|
|---|
| 35 | #else
|
|---|
| 36 | /* this is used only to eliminate compiler warnings */
|
|---|
| 37 | int umalloc_empty;
|
|---|
| 38 | #endif
|
|---|
| 39 |
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.