The GC scans the entire RCRootSegment regardless of stackTop. I'm not familiar with its usage enough to know if this is a real problem but in theory we only need to scan to stackTop and there could be unnecessary retention caused by scanning everything. Another concern is that most VMPI_alloca callers are allocating pointer free memory (chars/wchar/ints) but we always scan this memory. Maybe VMPI_alloca should have a separate path for opaque memory that doesn't use GCRoots. If AVMPLUS_HEAP_ALLOCA is defined these problems become more prevalent since we stop using the C stack completely.
Really two different bugs here.
Summary: VMPI_alloca is suboptimal from a GC perspective → VMPI_alloca pointer scan should only consider used portion; pointerfree alloca memory might be desirable
With the new StackMemory type we can now handle the stack top appropriately. Regarding the other problem, most VMPI_alloca callers are, so far as I can tell, *not* allocating pointer-free memory -- I looked into that a couple of weeks ago, and apart from code in the number<->string code, all memory allocated appeared to be for argument areas for method invocation, this also appeared to be the case in the Flash Player.
Priority: -- → P3
Target Milestone: Future → Q3 11 - Serrano
You need to log in before you can comment on or make changes to this bug.