🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.sun
Article #6765

Using malloc with XView

#6765
From: scott%grlab.uucp
Date: Mon, 28 Jan 1991 14:12
23 lines
1703 bytes
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@hpubvwa.NSR.HP.COM
       150 Lake Str S, #206      ..or..  scott@grlab.Celestial.COM
       Kirkland, WA USA 98033    ..or..  ...!hpubvwa!grlab!scott
Voice: 206/828-4691             FAX:     206/828-4236
Technical Details
Message-ID: <1517@brchh104.bnr.ca>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!cunews!bnrgate!brtph3!brchh104!brchs1!bnr.ca!rice.edu!sun-spots-request

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!cunews!bnrgate!brtph3!brchh104!brchs1!bnr.ca!rice.edu!sun-spots-request
From: scott%grlab.uucp@hpubvwa.nsr.hp.com
Newsgroups: comp.sys.sun
Subject: Using malloc with XView
Keywords: Windows
Message-ID: <1517@brchh104.bnr.ca>
Date: 28 Jan 91 14:12:38 GMT
Sender: news@brchh104.bnr.ca
Organization: Sun-Spots
Lines: 23
Approved: Sun-Spots@rice.edu
X-Sun-Spots-Digest: Volume 10, Issue 37, message 8
X-Note: Submissions: sun-spots@rice.edu, Admin: sun-spots-request@rice.edu