1 /*
2  * Copyright (C) 2022 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #pragma once
18 
19 #include <sys/types.h>
20 
21 enum dlmalloc_test_command {
22     DLMALLOC_TEST_NOP,
23     DLMALLOC_TEST_ONE_MALLOC,
24     DLMALLOC_TEST_ONE_CALLOC,
25     DLMALLOC_TEST_ONE_REALLOC,
26     DLMALLOC_TEST_MANY_MALLOC,
27     DLMALLOC_TEST_ONE_NEW,
28     DLMALLOC_TEST_ONE_NEW_ARR,
29     DLMALLOC_TEST_MALLOC_AND_NEW,
30     DLMALLOC_TEST_DOUBLE_FREE,
31     DLMALLOC_TEST_REALLOC_AFTER_FREE,
32     DLMALLOC_TEST_DEALLOC_TYPE_MISMATCH,
33     DLMALLOC_TEST_ALLOC_LARGE,
34     DLMALLOC_TEST_BAD_CMD
35 };
36 
37 struct dlmalloc_test_msg {
38     uint8_t cmd;
39 };
40