summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2006-08-07 19:51:59 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2006-08-07 19:51:59 (GMT)
commit4f289e5b9240807d9fa5561fd793981334a9f086 (patch)
tree8a22e083cdab59a3af1577fe5c50f6054b22e958 /test
parent80b1c44327f56c2e7edd75389e5b3b5a9b5ea833 (diff)
downloadhdf5-4f289e5b9240807d9fa5561fd793981334a9f086.zip
hdf5-4f289e5b9240807d9fa5561fd793981334a9f086.tar.gz
hdf5-4f289e5b9240807d9fa5561fd793981334a9f086.tar.bz2
[svn-r12551] Description:
Refactor fields in heap header to clean out information from dropped features and also group related fields together more nicely. Add fields to heap header for storing information about "huge" objects. Platforms tested: Linux/32 2.6 (chicago) Linux/64 2.6 (chicago)
Diffstat (limited to 'test')
-rw-r--r--test/fheap.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/test/fheap.c b/test/fheap.c
index f3ffa9c..a38238a 100644
--- a/test/fheap.c
+++ b/test/fheap.c
@@ -39,7 +39,6 @@
#define NUM_FILL_OBJS 11
/* "Small" heap creation parameters */
-#define SMALL_ADDRMAP H5HF_ABSOLUTE /* Heap address mapping */
#define SMALL_DBLOCK_OVERHEAD 22 /* Overhead for direct blocks */
#define SMALL_MAN_WIDTH 4 /* Managed obj. table width */
#define SMALL_MAN_START_BLOCK_SIZE 512 /* Managed obj. starting block size */
@@ -158,8 +157,7 @@ init_small_cparam(H5HF_create_t *cparam)
HDmemset(cparam, 0, sizeof(H5HF_create_t));
/* General parameters */
- cparam->addrmap = SMALL_ADDRMAP;
- cparam->standalone_size = SMALL_STAND_SIZE;
+ cparam->max_man_size = SMALL_STAND_SIZE;
/* Managed object doubling-table parameters */
cparam->managed.width = SMALL_MAN_WIDTH;
@@ -10978,8 +10976,8 @@ HDfprintf(stderr, "Random # seed was: %lu\n", seed);
total_obj_added = 0;
while(total_obj_added < size_limit) {
/* Choose a random size of object (from 1 up to stand alone block size) */
- obj_size = (HDrandom() % (cparam->standalone_size - 1)) + 1;
- obj_loc = cparam->standalone_size - obj_size;
+ obj_size = (HDrandom() % (cparam->max_man_size - 1)) + 1;
+ obj_loc = cparam->max_man_size - obj_size;
/* Insert object */
if(add_obj(fh, dxpl, obj_loc, obj_size, NULL, &keep_ids))
@@ -11155,14 +11153,14 @@ HDfprintf(stderr, "Random # seed was: %lu\n", seed);
* 25% of the objects will be twice as large, 12.5% will be
* four times larger, etc.)
*/
- while(HDrandom() < (RAND_MAX / 2) && size_range < cparam->standalone_size)
+ while(HDrandom() < (RAND_MAX / 2) && size_range < cparam->max_man_size)
size_range *= 2;
- if(size_range > cparam->standalone_size)
- size_range = cparam->standalone_size;
+ if(size_range > cparam->max_man_size)
+ size_range = cparam->max_man_size;
/* Choose a random size of object (from 1 up to stand alone block size) */
obj_size = (HDrandom() % (size_range - 1)) + 1;
- obj_loc = cparam->standalone_size - obj_size;
+ obj_loc = cparam->max_man_size - obj_size;
/* Insert object */
if(add_obj(fh, dxpl, obj_loc, obj_size, NULL, &keep_ids))
@@ -11312,7 +11310,7 @@ main(void)
init_small_cparam(&cparam);
/* Allocate space for the shared objects */
- shared_obj_size_g = cparam.standalone_size + 256;
+ shared_obj_size_g = cparam.max_man_size + 256;
shared_wobj_g = H5MM_malloc(shared_obj_size_g);
shared_robj_g = H5MM_malloc(shared_obj_size_g);