summaryrefslogtreecommitdiffstats
path: root/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/core/iwasm/fast-jit/jit_utils.c
blob: 57a3e8f678cbc3678ebb8712316c4ad94df43abc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/*
 * Copyright (C) 2021 Intel Corporation.  All rights reserved.
 * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 */

#include "jit_utils.h"

JitBitmap *
jit_bitmap_new(uintptr_t begin_index, unsigned bitnum)
{
    JitBitmap *bitmap;

    if ((bitmap = jit_calloc(offsetof(JitBitmap, map) + (bitnum + 7) / 8))) {
        bitmap->begin_index = begin_index;
        bitmap->end_index = begin_index + bitnum;
    }

    return bitmap;
}