mirror of
https://github.com/openharmony/drivers_framework.git
synced 2026-07-21 03:35:25 -04:00
c85b17efd8
Signed-off-by: wangchangliang21 <austin.wang@huawei.com>
43 lines
838 B
C
43 lines
838 B
C
/*
|
|
* Copyright (c) 2021-2021 Huawei Device Co., Ltd.
|
|
*
|
|
* HDF is dual licensed: you can use it either under the terms of
|
|
* the GPL, or the BSD license, at your option.
|
|
* See the LICENSE file in the root of this repository for complete details.
|
|
*/
|
|
|
|
#ifndef OBJECT_ALLOC_H
|
|
#define OBJECT_ALLOC_H
|
|
|
|
#include <stdint.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
struct HdfObjectChunkConfig {
|
|
uint32_t chunkSize;
|
|
uint32_t chunkCount;
|
|
};
|
|
|
|
struct HdfObjectPoolConfig {
|
|
char *buffer;
|
|
uint32_t bufferSize;
|
|
uint32_t numChunks;
|
|
const struct HdfObjectChunkConfig *chunks;
|
|
};
|
|
|
|
void *HdfObjectAllocAlloc(size_t size);
|
|
|
|
void HdfObjectAllocFree(void *object);
|
|
|
|
const struct HdfObjectPoolConfig *ObjectAllocGetConfig(void);
|
|
void HdfObjectAllocInit();
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif /* __cplusplus */
|
|
|
|
#endif /* BLOCK_BUFFER_H */
|
|
|