🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.os.os2.programmer.misc
2 messages
2 total messages Started by Keith Bennett Wed, 15 May 1996 00:00
DosSubFreeMem(): Coalesces Contiguous Blocks?
#159
Author: Keith Bennett
Date: Wed, 15 May 1996 00:00
20 lines
1150 bytes
This message pertains to DosSubFreeMem() and related functions.

When it frees a block, does it join together contiguous free areas of
memory?

We're getting a problem where we're running out of memory prematurely.

In general, is the algorithm for allocating and freeing fairly
intelligent?

Thanks for any help.

- Keith

-- 
--------------------------------------------------------------------------
Keith Bennett                             Bennett Business Solutions, Inc.
Silver Spring, MD USA                     OS/2 & DOS Software Development
kbennett@cpcug.org                        (301) 871-7696
Re: DosSubFreeMem(): Coalesces Contiguous Blocks?
#161
Author: Thierry de Montaudry
Date: Fri, 17 May 1996 00:00
26 lines
1604 bytes
In <4ndid4$d0m@cpcug.org>, kbennett@cpcug.org (Keith Bennett) writes:
>This message pertains to DosSubFreeMem() and related functions.
>
>When it frees a block, does it join together contiguous free areas of
>memory?
>
>We're getting a problem where we're running out of memory prematurely.
>
>In general, is the algorithm for allocating and freeing fairly
>intelligent?
>
As much as I've used it, the best way to use DosSub... function is to allocate
a big memory buffer (more than one meg) as uncommited memory, and let
DosSub... functions manage it. What ever you allocate will be commited as it
is needed. As far as I know, if you free a memory a block, the function won't
shrink any memory (it cannot change the address of the already allocated
blocks), but it will uncommit blocks of memory that are not in use
anymore (if you used DosSetMem with the option DOSSUB_SPARSE_OBJ).

	Thierry

/------------------------------
Thierry de Montaudry
thierry@absa.co.za
thierry@solo.pipex.co.za
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads