home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.ms-windows.programmer.tools
- Path: sparky!uunet!spool.mu.edu!yale.edu!jvnc.net!newsserver.technet.sg!nuscc!cherry!shah
- From: shah@cherry.NoSubdomain.NoDomain (Shahrin Abdullah)
- Subject: Re: How to implement a Linked List
- Message-ID: <1992Dec17.084558.9832@nuscc.nus.sg>
- Sender: shah@cherry (Shahrin Abdullah)
- Organization: Institute of Systems Science, NUS, Singapore
- References: <1992Dec16.062628.3410@nuscc.nus.sg> <724532588snz@chrism.demon.co.uk>
- Date: Thu, 17 Dec 1992 08:45:58 GMT
- Lines: 32
-
- In article <724532588snz@chrism.demon.co.uk>, chris@chrism.demon.co.uk (Chris Marriott) writes:
- |> In article <1992Dec16.062628.3410@nuscc.nus.sg> shah@cherry.NoSubdomain.NoDomain writes:
- |>
- |> >Hi there!
- |> >Does anyone out there knows how to implement a linked list for Windows using
- |> >MS C7. I know how to do it in C but in Windows it look tricky. I think I may
- |> >need to use the global heap with the GMEM_MOVEABLE flag but I not too sure
- |> >of going around doing it. Can anyone gave me some pointer, please. Any
- |> >source code sample is also appreciated.
- |> >
- |> >Shahrin
- |> >E-mail shah@iss.nus.sg
- |> >
- |>
- |> If you're using Microsoft C7, you can implement a linked list in Windows
- |> in exactly the same way you would for DOS - just use the standard run time
- |> library "malloc" function. If you use the large memory model (and there's
- |> no reason not to, any more), "malloc" gets mapped onto calls to a pretty
- |> good "sub-allocator".
- |>
- |> Chris
- |> --
-
- The problem here is that malloc will map the memory allocation to the local
- heap. Thus if the node dynamically grow too large the local heap won't be
- able to handle that. So the question remain - how do U implement a linear
- linked list using the Global Heap? Thanks Chris.
-
- Cheers!
- Shahrin
- E-mail shah@iss.nus.sg
-
-