static void *bsd_vmalloc(size_t size)

{

    void *p;

    mmap_lock();

    /* Use map and mark the pages as used.  */

    p = mmap(NULL, size, PROT_READ | PROT_WRITE,

             MAP_PRIVATE | MAP_ANON, -1, 0);



    if (h2g_valid(p)) {

        /* Allocated region overlaps guest address space.

           This may recurse.  */

        abi_ulong addr = h2g(p);

        page_set_flags(addr & TARGET_PAGE_MASK, TARGET_PAGE_ALIGN(addr + size),

                       PAGE_RESERVED);

    }



    mmap_unlock();

    return p;

}

static void *bsd_vmalloc(size_t size)

{

    void *p;

    mmap_lock();

    

    p = mmap(NULL, size, PROT_READ | PROT_WRITE,

             MAP_PRIVATE | MAP_ANON, -1, 0);



    if (h2g_valid(p)) {

        



        abi_ulong addr = h2g(p);

        page_set_flags(addr & TARGET_PAGE_MASK, TARGET_PAGE_ALIGN(addr + size),

                       PAGE_RESERVED);

    }



    mmap_unlock();

    return p;

}

static void *bsd_vmalloc(size_t size)     void *p;     mmap_lock();     p = mmap(NULL, size, PROT_READ | PROT_WRITE,              MAP_PRIVATE | MAP_ANON, -1, 0);     if (h2g_valid(p)) {         abi_ulong addr = h2g(p);         page_set_flags(addr & TARGET_PAGE_MASK, TARGET_PAGE_ALIGN(addr + size),                        PAGE_RESERVED);     mmap_unlock();     return p;
static void *FUNC_0(size_t VAR_0)

{

    void *VAR_1;

    mmap_lock();

    

    VAR_1 = mmap(NULL, VAR_0, PROT_READ | PROT_WRITE,

             MAP_PRIVATE | MAP_ANON, -1, 0);



    if (h2g_valid(VAR_1)) {

        



        abi_ulong addr = h2g(VAR_1);

        page_set_flags(addr & TARGET_PAGE_MASK, TARGET_PAGE_ALIGN(addr + VAR_0),

                       PAGE_RESERVED);

    }



    mmap_unlock();

    return VAR_1;

}

static void *FUNC_0(size_t VAR_0)
{ void *VAR_1; mmap_lock(); VAR_1 = mmap(NULL, VAR_0, PROT_READ | PROT_WRITE,
MAP_PRIVATE | MAP_ANON, -1, 0); if (h2g_valid(VAR_1)) { abi_ulong addr = h2g(VAR_1); page_set_flags(addr & TARGET_PAGE_MASK, TARGET_PAGE_ALIGN(addr + VAR_0),
PAGE_RESERVED); } mmap_unlock(); return VAR_1; }