mirror of
https://github.com/HDFGroup/hdf5.git
synced 2024-11-21 01:04:10 +08:00
[svn-r3746] Purpose:
Code tweak Description: Large data arrays were being created on the stack. Solution: Hoisted the data variables out of the function(s) and make into static variables. Platforms tested: FreeBSD 4.3 (hawkwind)
This commit is contained in:
parent
e7e8b02c3a
commit
4650caa3a6
@ -24,6 +24,9 @@ const char *FILENAME[] = {
|
|||||||
|
|
||||||
#define H5Z_BOGUS 305
|
#define H5Z_BOGUS 305
|
||||||
|
|
||||||
|
/* Shared global arrays */
|
||||||
|
int points[100][200], check[100][200];
|
||||||
|
|
||||||
|
|
||||||
/*-------------------------------------------------------------------------
|
/*-------------------------------------------------------------------------
|
||||||
* Function: test_create
|
* Function: test_create
|
||||||
@ -175,7 +178,6 @@ static herr_t
|
|||||||
test_simple_io(hid_t file)
|
test_simple_io(hid_t file)
|
||||||
{
|
{
|
||||||
hid_t dataset, space, xfer;
|
hid_t dataset, space, xfer;
|
||||||
int points[100][200], check[100][200];
|
|
||||||
int i, j, n;
|
int i, j, n;
|
||||||
hsize_t dims[2];
|
hsize_t dims[2];
|
||||||
void *tconv_buf = NULL;
|
void *tconv_buf = NULL;
|
||||||
@ -360,7 +362,6 @@ static herr_t
|
|||||||
test_compression(hid_t file)
|
test_compression(hid_t file)
|
||||||
{
|
{
|
||||||
hid_t dataset, space, xfer, dc;
|
hid_t dataset, space, xfer, dc;
|
||||||
int points[100][200], check[100][200];
|
|
||||||
const hsize_t size[2] = {100, 200};
|
const hsize_t size[2] = {100, 200};
|
||||||
const hsize_t chunk_size[2] = {2, 25};
|
const hsize_t chunk_size[2] = {2, 25};
|
||||||
const hssize_t hs_offset[2] = {7, 30};
|
const hssize_t hs_offset[2] = {7, 30};
|
||||||
|
@ -18,6 +18,8 @@ const char *FILENAME[] = {
|
|||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static double the_data[100][100];
|
||||||
|
|
||||||
|
|
||||||
/*-------------------------------------------------------------------------
|
/*-------------------------------------------------------------------------
|
||||||
* Function: main
|
* Function: main
|
||||||
@ -41,7 +43,6 @@ main(void)
|
|||||||
hid_t fapl, file, dcpl, space, dset, groups, grp;
|
hid_t fapl, file, dcpl, space, dset, groups, grp;
|
||||||
hsize_t ds_size[2] = {100, 100};
|
hsize_t ds_size[2] = {100, 100};
|
||||||
hsize_t ch_size[2] = {5, 5};
|
hsize_t ch_size[2] = {5, 5};
|
||||||
double the_data[100][100];
|
|
||||||
hsize_t i, j;
|
hsize_t i, j;
|
||||||
char name[1024];
|
char name[1024];
|
||||||
|
|
||||||
|
@ -17,6 +17,8 @@ const char *FILENAME[] = {
|
|||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static double the_data[100][100];
|
||||||
|
|
||||||
|
|
||||||
/*-------------------------------------------------------------------------
|
/*-------------------------------------------------------------------------
|
||||||
* Function: main
|
* Function: main
|
||||||
@ -39,7 +41,7 @@ main(void)
|
|||||||
{
|
{
|
||||||
hid_t fapl, file, space, dset, groups, grp;
|
hid_t fapl, file, space, dset, groups, grp;
|
||||||
hsize_t ds_size[2];
|
hsize_t ds_size[2];
|
||||||
double the_data[100][100], error;
|
double error;
|
||||||
hsize_t i, j;
|
hsize_t i, j;
|
||||||
char name[1024];
|
char name[1024];
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user