mirror of
https://github.com/nyanmisaka/mpp.git
synced 2025-09-26 21:15:53 +08:00

Signed-off-by: Chandler Chen <chandler.chen@rock-chips.com> Signed-off-by: Hongjin Li <vic.hong@rock-chips.com> Signed-off-by: Herman Chen <herman.chen@rock-chips.com> Change-Id: I927346dfdb0edea486b8dda61f379f96059b01ba
37 lines
743 B
C
37 lines
743 B
C
/* SPDX-License-Identifier: Apache-2.0 OR MIT */
|
|
/*
|
|
* Copyright (c) 2015 Rockchip Electronics Co., Ltd.
|
|
*/
|
|
|
|
#define MODULE_TAG "mpp_mem_test"
|
|
|
|
#include "mpp_log.h"
|
|
#include "mpp_env.h"
|
|
#include "mpp_mem.h"
|
|
|
|
// TODO: need to add pressure test case and parameter scan case
|
|
|
|
int main()
|
|
{
|
|
void *tmp = NULL;
|
|
|
|
tmp = mpp_calloc(int, 100);
|
|
if (tmp) {
|
|
mpp_log("calloc success ptr 0x%p\n", tmp);
|
|
} else {
|
|
mpp_log("calloc failed\n");
|
|
}
|
|
if (tmp) {
|
|
tmp = mpp_realloc(tmp, int, 200);
|
|
if (tmp) {
|
|
mpp_log("realloc success ptr 0x%p\n", tmp);
|
|
} else {
|
|
mpp_log("realloc failed\n");
|
|
}
|
|
}
|
|
mpp_free(tmp);
|
|
mpp_log("mpp_mem_test done\n");
|
|
|
|
return 0;
|
|
}
|