Browse Prior Art Database

Automatic Segment Resizing to Conserve Use of Subsetted Memory

IP.com Disclosure Number: IPCOM000108631D
Original Publication Date: 1992-Jun-01
Included in the Prior Art Database: 2005-Mar-22
Document File: 1 page(s) / 59K

Publishing Venue

IBM

Related People

Cox, D: AUTHOR [+3]

Abstract

This article describes a method for automatically resizing OS/2* memory segments, allowing an application to conserve the use of OS/2 subsetted memory. An application program should not allocate maximum size segments if not needed, as this increases the program's working set size and wastes memory. However, if an application wishes to allocate only that memory which is required initially, the application program must check each DosSubAlloc() request for an out of memory condition specifically. Then the application must decide whether to reallocate and grow the existing segment, or to allocate a new segment for subsetting.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 56% of the total text.

Automatic Segment Resizing to Conserve Use of Subsetted Memory

       This article describes a method for automatically
resizing OS/2* memory segments, allowing an application to conserve
the use of OS/2 subsetted memory.  An application program should not
allocate maximum size segments if not needed, as this increases the
program's working set size and wastes memory.  However, if an
application wishes to allocate only that memory which is required
initially, the application program must check each DosSubAlloc()
request for an out of memory condition specifically.  Then the
application must decide whether to reallocate and grow the existing
segment, or to allocate a new segment for subsetting.

      In order to overcome this and other related memory problems in
our application systems, OfficeVision*/2 (OV/2) Office built a Memory
Management subsystem, providing a layer of independence between
applications programs and the OS/2 operating system.  This subsystem
is described in (*). Using this Memory Management subsystem as the
base, the subsystem was enhanced to initially establish a small
default segment size, unless otherwise requested by the caller.  The
OV/2 implementation used 4098(4K) bytes.  Now, when an out of memory
condition was encountered on a call to DosSubAlloc(), the segment is
reallocated with the DosReallocSeg() API.  This reallocation occurs
by the default amount (4K), until the segment size has reached its
maximum allowable size (64K).  W...