Article View: comp.os.os2.programmer
Article #729Re: CreateThread using malloc
From: David Charlap
Date: Thu, 16 Apr 1992 13:24
Date: Thu, 16 Apr 1992 13:24
26 lines
1614 bytes
1614 bytes
In article <jj91eqk@twilight.wpd.sgi.com> fanj@remb6489.wpd writes: >I was using CreateThread call to create several threads. Before that I was >using 'malloc' to create the stack which is needed as one of the parameters >for 'CreateThread' call. > >I donot know if use of 'malloc' is proper. I also looked into the >use of 'DosAllocSeg'. And I got "wrong ring level" error msg while using >'DosAllocSeg'. > >In short, I am confused in how to create the stack for theads. Any ideas? Can't help you there. malloc() should be fine. It maps onto a subroutine based on DosAllocSeg. About your "Wrong Ring Level", did you remember to run the macro to convert the memory HANDLE returned to the memory POINTER you probably need? (which malloc() returns) I don't know the name of the macro, but it's been posted a few times. -- David Charlap Q:"Where do these stairs go?" dic5340@hertz.njit.edu A:"They go up" ---------------------------- Hi! I am a .signature virus. Copy me into your .signature to join in!
Technical Details
Message-ID:
<1992Apr16.132409.23683@njitgw.njit.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!think.com!yale.edu!jvnc.net!darwin.sura.net!gatech!rutgers!njitgw.njit.edu!hertz.njit.edu!dic5340References:
<jj91eqk@twilight.wpd.sgi.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!think.com!yale.edu!jvnc.net!darwin.sura.net!gatech!rutgers!njitgw.njit.edu!hertz.njit.edu!dic5340 From: dic5340@hertz.njit.edu (David Charlap) Newsgroups: comp.os.os2.programmer,comp.os.os2 Subject: Re: CreateThread using malloc Keywords: stack, DosAllocSeg Message-ID: <1992Apr16.132409.23683@njitgw.njit.edu> Date: 16 Apr 92 13:24:09 GMT References: <jj91eqk@twilight.wpd.sgi.com> Sender: news@njit.edu Organization: New Jersey Institute of Technology, Newark, N.J. Lines: 26 Nntp-Posting-Host: hertz.njit.edu