1 /***************************************************************************
2 * Copyright 1995, Technion, Israel Institute of Technology
3 * Electrical Eng, Software Lab.
4 * Author: Michael Veksler.
5 ***************************************************************************
7 * Purpose : test shared DDE memory functionality for DDE
8 * Usage: Look for assertion failures
9 ***************************************************************************
17 void ATOM_GlobalInit()
19 printf("ATOM_GlobalInit\n");
30 /* alloc h1, h2, h3 */
33 p1
=DDE_malloc(GMEM_DDESHARE
, 0x6000, &shmdata
);
37 p2
=DDE_malloc(GMEM_DDESHARE
, 0xff00, &shmdata
);
41 p3
=DDE_malloc(GMEM_DDESHARE
, 0x6000, &shmdata
);
47 p
=DDE_AttachHandle(h1
,NULL
);
49 p
=DDE_AttachHandle(h2
,NULL
);
51 p
=DDE_AttachHandle(h3
,NULL
);
56 ret
=DDE_GlobalFree(h1
);
58 /* do some implementation dependant tests */
59 p
=DDE_malloc(GMEM_DDESHARE
, 0x6000, &shmdata
);
61 assert(shmdata
.handle
==h1
);
62 p
=DDE_AttachHandle(h1
,NULL
);
66 ret
=DDE_GlobalFree(h1
);
68 ret
=DDE_GlobalFree(h2
);
70 ret
=DDE_GlobalFree(h3
);