Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ memvary(2) — HP-UX 5.20

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ems(2)

memallc(2)

memchmd(2)

MEMVARY(2)  —  HP-UX

Series 500 Only

NAME

memvary − modify segment length

SYNOPSIS

#include <sys/ems.h>
#include <sys/types.h>
intmemvary(addr, len);
caddr_taddr;
intlen;

DESCRIPTION

Memvary allows the modification of the size of the memory space allocated by memallc(2).

Addr is the pointer to the address space which can be either shared or private.  If the address space has been file mapped and is extended beyond the the end of the file, then the file will also reflect the change in length.  When the file mapped address space is reduced, the actual file length will be unchanged and the file space after the end of the mapped file space will also remain unchanged.  A change in length for a private file mapped address space will have no effect on the source file. 

Len specifies the new length of the address space.  In the case of an error, the address space and file space will be the same as before the system call. 

When private file mapped address space is extended, the additional address space is initialized to zeroes.  When shared file mapped address space is extended, the additional space is initialized to the contents of the file, or zeros if the file is extended. 

The address space cannot be extended beyond the ’maxlen’ specified during the memallc(2) system call.

ERRORS

Memvary will fail if one or more of the following are true:

ERRNO ERRINFO DESCRIPTION



[ENOMEM] 5, 41 Insufficient memory
[EINVAL] 47 Invalid segment size
256 Segment does not exist
264 Cannot extend locked segment
276 locked page encountered
449 Segment not allocated with ems(2) subsystem

RETURN VALUE

Upon successful completion, memvary returns 0.  Otherwise, a value of -1 is returned and errno is set to indicate the error. 

AUTHOR

Memvary was developed by the Hewlett-Packard Company. 

SEE ALSO

ems(2), memallc(2), memchmd(2). 

Hewlett-Packard Company  —  Version B.1,  April 12, 1993

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026