Using malloc with XView
scott%grlab.uucp at hpubvwa.nsr.hp.com
scott%grlab.uucp at hpubvwa.nsr.hp.com
Tue Jan 29 01:12:38 AEST 1991
Has anyone noticed some funny behavior from mixing large malloc requests
with XView object creation? I had some code that xv_create'd some stuff,
then allocated a large (6x20) array, then filled in the array with
xv_create'd object handles. Towards the end of the xv_create calls, I
noticed that the object handle numbers started overlapping the address of
my array values. With a debugger, I stepped through doing
xv_get(obj,PANEL_VALUE) on some of the earlier objects. After a while the
xv_get's started returning nil, and I got some XView errors about "bad
seal".
I changed the array to be a static array instead of a dynamically
allocated, and things started working. Are there any guidelines about
using dynamically allocated memory from within an XView application that I
need to worry about? (NOTE: This is running OpenWindows v2.0 on a SPARC
1+ with SunOS 4.1)
Thanks for any help,
Scott Blachowicz
USPS: Graphicus E-mail: scott%grlab.UUCP at hpubvwa.NSR.HP.COM
150 Lake Str S, #206 ..or.. scott at grlab.Celestial.COM
Kirkland, WA USA 98033 ..or.. ...!hpubvwa!grlab!scott
Voice: 206/828-4691 FAX: 206/828-4236
More information about the Comp.sys.sun
mailing list