FreeRDP
alignment.c File Reference
#include <winpr/crt.h>
#include <stdint.h>
#include <limits.h>
#include <stdlib.h>
#include <malloc.h>
#include "../log.h"

Macros

#define WINPR_ALIGNED_MEM_SIGNATURE   0x0BA0BAB
 
#define WINPR_ALIGNED_MEM_STRUCT_FROM_PTR(_memptr)   (WINPR_ALIGNED_MEM*) (((size_t)(((BYTE*) _memptr) - sizeof(WINPR_ALIGNED_MEM))));
 
#define TAG   WINPR_TAG("crt")
 

Functions

void_aligned_malloc (size_t size, size_t alignment)
 
void_aligned_realloc (void *memblock, size_t size, size_t alignment)
 
void_aligned_recalloc (void *memblock, size_t num, size_t size, size_t alignment)
 
void_aligned_offset_malloc (size_t size, size_t alignment, size_t offset)
 
void_aligned_offset_realloc (void *memblock, size_t size, size_t alignment, size_t offset)
 
void_aligned_offset_recalloc (void *memblock, size_t num, size_t size, size_t alignment, size_t offset)
 
size_t _aligned_msize (void *memblock, size_t alignment, size_t offset)
 
void _aligned_free (void *memblock)
 

Macro Definition Documentation

#define TAG   WINPR_TAG("crt")
#define WINPR_ALIGNED_MEM_SIGNATURE   0x0BA0BAB

WinPR: Windows Portable Runtime Data Alignment

Copyright 2012 Marc-Andre Moreau marca.nosp@m.ndre.nosp@m..more.nosp@m.au@g.nosp@m.mail..nosp@m.com

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.

#define WINPR_ALIGNED_MEM_STRUCT_FROM_PTR (   _memptr)    (WINPR_ALIGNED_MEM*) (((size_t)(((BYTE*) _memptr) - sizeof(WINPR_ALIGNED_MEM))));

Function Documentation

void _aligned_free ( void memblock)

Here is the caller graph for this function:

void* _aligned_malloc ( size_t  size,
size_t  alignment 
)

Here is the call graph for this function:

Here is the caller graph for this function:

size_t _aligned_msize ( void memblock,
size_t  alignment,
size_t  offset 
)
void* _aligned_offset_malloc ( size_t  size,
size_t  alignment,
size_t  offset 
)

Here is the caller graph for this function:

void* _aligned_offset_realloc ( void memblock,
size_t  size,
size_t  alignment,
size_t  offset 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void* _aligned_offset_recalloc ( void memblock,
size_t  num,
size_t  size,
size_t  alignment,
size_t  offset 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void* _aligned_realloc ( void memblock,
size_t  size,
size_t  alignment 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void* _aligned_recalloc ( void memblock,
size_t  num,
size_t  size,
size_t  alignment 
)

Here is the call graph for this function: