summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorPatrick Lu <ptlu@hawkwind.ncsa.uiuc.edu>1999-04-16 19:20:28 (GMT)
committerPatrick Lu <ptlu@hawkwind.ncsa.uiuc.edu>1999-04-16 19:20:28 (GMT)
commit68985e9d3c1fb1480e7d1300d5d8e0e1473a2fa7 (patch)
tree2c0903af1c6988b20f055e37280cfb9df0d1fc8f /test
parent924cb75ba881bd6c17629f11937d79ce23fab8d0 (diff)
downloadhdf5-68985e9d3c1fb1480e7d1300d5d8e0e1473a2fa7.zip
hdf5-68985e9d3c1fb1480e7d1300d5d8e0e1473a2fa7.tar.gz
hdf5-68985e9d3c1fb1480e7d1300d5d8e0e1473a2fa7.tar.bz2
[svn-r1191] moved some code around to fix a crash.
code is surounded by #ifdef WIN32
Diffstat (limited to 'test')
-rw-r--r--test/hyperslab.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/test/hyperslab.c b/test/hyperslab.c
index 8b226a6..c1e7df8 100644
--- a/test/hyperslab.c
+++ b/test/hyperslab.c
@@ -602,7 +602,7 @@ test_multifill(size_t nx)
hssize_t src_stride;
hssize_t dst_stride;
char s[64];
-
+
struct a_struct {
int left;
double mid;
@@ -613,8 +613,16 @@ test_multifill(size_t nx)
fflush(stdout);
/* Initialize the source and destination */
+#ifndef WIN32
src = H5MM_malloc(nx * sizeof(*src));
dst = H5MM_malloc(nx * sizeof(*dst));
+#else
+/*
+ to match the HDfree I plan on using to free this memory
+ */
+ src = malloc(nx * sizeof(*src));
+ dst = malloc(nx * sizeof(*dst));
+#endif
for (i = 0; i < nx; i++) {
src[i].left = 1111111;
src[i].mid = 12345.6789;
@@ -677,10 +685,18 @@ test_multifill(size_t nx)
goto error;
}
}
-
+
puts(" PASSED");
+#ifndef WIN32
H5MM_xfree(src);
H5MM_xfree(dst);
+#else
+/*
+ The above calls to H5MM_xfree crash on NT but using free does not.
+*/
+ HDfree(src);
+ HDfree(dst);
+#endif
return SUCCEED;
error: