MemManager.h
Go to the documentation of this file.
/*
* Copyright (C) 2016-2023 Grok Image Compression Inc.
*
* This source code is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License, version 3,
* as published by the Free Software Foundation.
*
* This source code is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*
* This source code incorporates work covered by the BSD 2-clause license.
* Please see the LICENSE file in the root directory for details.
*
*/
#pragma once
#if defined(__GNUC__) && !defined(GROK_SKIP_POISON)
#pragma GCC poison malloc calloc realloc free
#endif
#include <cstddef>
namespace grk
{
uint32_t grk_make_aligned_width(uint32_t width);
void* grk_malloc(size_t size);
void* grk_calloc(size_t numOfElements, size_t sizeOfElements);
void* grk_aligned_malloc(size_t size);
void grk_aligned_free(void* ptr);
void* grk_realloc(void* m, size_t s);
void grk_free(void* m);
} // namespace grk
grk
Copyright (C) 2016-2023 Grok Image Compression Inc.
Definition ICacheable.h:20
grk::grk_read
void grk_read(const uint8_t *buffer, TYPE *value, uint32_t numBytes)
Definition BufferedStream.h:239
grk::grk_make_aligned_width
uint32_t grk_make_aligned_width(uint32_t width)
Definition MemManager.cpp:35
grk::grk_free
void grk_free(void *ptr)
Deallocates or frees a memory block.
Definition MemManager.cpp:96
grk::grk_aligned_malloc
void * grk_aligned_malloc(size_t size)
Allocate memory aligned to a 16 byte boundary.
Definition MemManager.cpp:76
grk::grk_malloc
void * grk_malloc(size_t size)
Allocate an uninitialized memory block.
Definition MemManager.cpp:60
grk::grk_aligned_free
void grk_aligned_free(void *ptr)
Definition MemManager.cpp:80
grk::grk_realloc
void * grk_realloc(void *ptr, size_t new_size)
Reallocate memory blocks.
Definition MemManager.cpp:88
grk::grk_calloc
void * grk_calloc(size_t num, size_t size)
Allocate a memory block with elements initialized to 0.
Definition MemManager.cpp:68