This call unlocks a discardable segment.
DosUnlockSeg
Selector (SEL) - input
DosUnlockSeg is called to free memory for possible discard by the system in a low memory situation. The memory being freed is originally allocated by a call to DosAllocSeg or DosAllocHuge with AllocFlags bit 2 set. This memory may have been reallocated by a call to DosReallocSeg or DosReallocHuge after discard by the system.
Allocation and reallocation calls for discardable memory automatically lock the memory for access by the calling process. Thus, to access the segment, the caller does not have to lock the segment with DosLockSeg. Once a discardable segment is unlocked by a DosUnlockSeg request, access to the segment is gained by a successful DosLockSeg request.
DosUnlockSeg may also be used on segments that are non-discardable, in which case it has no effect.