__discarddata() — Release pages backing virtual storage

Standards

Standards / Extensions C or C++ Dependencies

Language Environment

both OS/390 V2R10

Format

#include <stdlib.h>

int __discarddata(void *addr, size_t size);

General description

The __discarddata() function is used to release segments of real storage backing virtual storage. Segments backing virtual storage are released beginning at location addr for a length of size. For AMODE 31, the addr must begin on a page (4K) boundary and size must be a multiple of 4K. For AMODE 64, the addr must begin on a segment (1 MB) boundary and size must be a multiple of 1 MB.

Returned value

If successful, __discarddata() returns 0.

If unsuccessful, because addr does not begin on a page (4K) boundary or size is not a multiple of 4K, __discarddata() returns -1.

There are no errno values defined.

Related information