Details

[Home]

Issue of the Standard # S0040

Brief

Lack of details in requirements to posix_memalign function.

Detailed Description

Specification does not describe the behavior of the function
int posix_memalign(void **memptr, const ptr_t restrict src, size_t alignment size_t size );

when the value of the parameter size is 0.

Problem location(s) in the standard

The Open Group Base Specifications Issue 6, IEEE Std 1003.1, 2004 Edition, System Interfaces,<br> description of function posix_memalign.

Possible consequences

Possible different behavior of applications on LSB-compliant implementations.

Possible solutions

Define function’s behavior when the value of the parameter size is 0. Behavior could be defined as for malloc: "If size is 0, either a null pointer or a unique pointer that can be successfully passed to free() shall be returned in memptr".

References

No references to this issue found.

Accepted

POSIX aardvark,
Request Number 141

[Home]