Lely core libraries 2.3.4
|
This header file is part of the C11 and POSIX compatibility library; it includes <stdlib.h>
and defines any missing functionality.
More...
Go to the source code of this file.
Functions | |
void * | aligned_alloc (size_t alignment, size_t size) |
Allocates space for an object whose alignment is specified by alignment, whose size is specified by size, and whose value is indeterminate. More... | |
void | aligned_free (void *ptr) |
Causes the space at ptr to be deallocated, that is, made available for further allocation. More... | |
This header file is part of the C11 and POSIX compatibility library; it includes <stdlib.h>
and defines any missing functionality.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Definition in file stdlib.h.
void * aligned_alloc | ( | size_t | alignment, |
size_t | size | ||
) |
Allocates space for an object whose alignment is specified by alignment, whose size is specified by size, and whose value is indeterminate.
The value of alignment SHALL be a valid alignment supported by the implementation and the value of size SHALL be an integral multiple of alignment.
To ensure maximum portability, objects allocated with this function SHOULD be freed with aligned_free().
void aligned_free | ( | void * | ptr | ) |
Causes the space at ptr to be deallocated, that is, made available for further allocation.
If ptr is a NULL pointer, no action occurs. Otherwise, if the argument does not match a pointer earlier returned by aligned_alloc(), or if the space has been deallocated by a call to aligned_free(), the behavior is undefined.