Skip to content
This repository was archived by the owner on Nov 1, 2020. It is now read-only.
This repository was archived by the owner on Nov 1, 2020. It is now read-only.

Wasm: RhpNewFastMisalign #8267

@yowl

Description

@yowl

@jkotas Did I get this right? I didn't do the fast path where there's a test something like advance <= acontext->alloc_limit so it always goes to RhpGcAlloc(pEEType, GC_ALLOC_ALIGN8_BIAS, size, NULL) . Looking at this path, I think it will go to

GCHeapUtilities::GetGCHeap()->Alloc(pThread->GetAllocContext(), cbSize, uFlags)

and then

hp->allocate (size + ComputeMaxStructAlignPad(requiredAlignment), acontext, flags)

and finally if there is enough space

        uint8_t*  result = acontext->alloc_ptr;
        acontext->alloc_ptr+=size;
        if (acontext->alloc_ptr <= acontext->alloc_limit)
        {
            CObjectHeader* obj = (CObjectHeader*)result;
            assert (obj != 0);
            return obj;
        }

And it won't be aligned. I take it from this that I have to implement the fast path in RhpNewFastMisalign?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions