Found out from /opt/appsupport/build.prop that the heapsize limit is indeed 256 MB.
Unfortunately, that file indicates how AAS is built, so no configuration file to change here.
I am pretty sure that it is the issue, but not what causes a lot of memory to be used during start.
A more elaborate log shows how it grows:
# appsupport-attach /system/bin/logcat | grep -E 'system_server|AndroidRuntime'
[...]
03-27 20:27:07.567 221 230 I system_server: Background young concurrent copying GC freed 6788(481KB) AllocSpace objects, 0(0B) LOS objects, 0% free, 69MB/69MB, paused 272us,79us total 121.408ms
03-27 20:27:07.740 221 230 I system_server: Background concurrent copying GC freed 8816(4669KB) AllocSpace objects, 2(104KB) LOS objects, 6% free, 80MB/86MB, paused 1.339ms,456us total 166.545ms
03-27 20:27:07.965 221 230 I system_server: Background concurrent copying GC freed 2106(379KB) AllocSpace objects, 0(0B) LOS objects, 5% free, 113MB/119MB, paused 122us,95us total 135.045ms
03-27 20:27:08.194 221 230 I system_server: Background concurrent copying GC freed 286(3431KB) AllocSpace objects, 6(120KB) LOS objects, 3% free, 148MB/154MB, paused 108us,87us total 150.655ms
03-27 20:27:08.486 221 230 I system_server: Background concurrent copying GC freed 545(4985KB) AllocSpace objects, 2(40KB) LOS objects, 3% free, 170MB/176MB, paused 106us,825us total 206.121ms
03-27 20:27:08.820 221 230 I system_server: Background young concurrent copying GC freed 29902(2228KB) AllocSpace objects, 20(1040KB) LOS objects, 0% free, 187MB/187MB, paused 148us,90us total 137.401ms
03-27 20:27:09.106 221 230 I system_server: Background concurrent copying GC freed 21337(4773KB) AllocSpace objects, 10(520KB) LOS objects, 2% free, 221MB/227MB, paused 136us,90us total 285.856ms
03-27 20:27:09.320 221 246 I system_server: Waiting for a blocking GC Alloc
03-27 20:27:09.507 221 230 I system_server: Clamp target GC heap from 258MB to 256MB
03-27 20:27:09.507 221 230 I system_server: Background concurrent copying GC freed 1535(4045KB) AllocSpace objects, 0(0B) LOS objects, 1% free, 252MB/256MB, paused 82us,61us total 314.401ms
03-27 20:27:09.507 221 246 I system_server: WaitForGcToComplete blocked Alloc on Background for 186.841ms
03-27 20:27:09.507 221 246 I system_server: Starting a blocking GC Alloc
03-27 20:27:09.524 221 246 I system_server: Starting a blocking GC Alloc
03-27 20:27:09.524 221 246 I system_server: Starting a blocking GC Alloc
03-27 20:27:09.547 221 246 I system_server: Alloc young concurrent copying GC freed 0(22KB) AllocSpace objects, 0(0B) LOS objects, 0% free, 254MB/256MB, paused 72us,71us total 23.192ms
03-27 20:27:09.547 221 246 I system_server: Forcing collection of SoftReferences for 4748KB allocation
03-27 20:27:09.547 221 246 I system_server: Starting a blocking GC Alloc
03-27 20:27:09.905 221 235 I system_server: Waiting for a blocking GC Alloc
[...]
03-27 20:27:10.070 221 246 I system_server: Clamp target GC heap from 260MB to 256MB
03-27 20:27:10.070 221 246 I system_server: Alloc concurrent copying GC freed 20220(904KB) AllocSpace objects, 0(0B) LOS objects, 0% free, 254MB/256MB, paused 74us,71us total 522.577ms
03-27 20:27:10.070 221 235 I system_server: WaitForGcToComplete blocked Alloc on Alloc for 165.667ms
03-27 20:27:10.070 221 235 I system_server: Starting a blocking GC Alloc
03-27 20:27:10.070 221 246 W system_server: Throwing OutOfMemoryError "Failed to allocate a 4861960 byte allocation with 1598048 free bytes and 1560KB until OOM, target footprint 268435456, growth limit 268435456" (VmSize 17240904 kB)
03-27 20:27:10.070 221 251 I system_server: WaitForGcToComplete blocked Alloc on Alloc for 163.643ms
03-27 20:27:10.070 221 251 I system_server: Starting a blocking GC Alloc
03-27 20:27:10.071 221 246 E AndroidRuntime: *** FATAL EXCEPTION IN SYSTEM PROCESS: android.bg
03-27 20:27:10.071 221 246 E AndroidRuntime: java.lang.OutOfMemoryError: Failed to allocate a 4861960 byte allocation with 1598048 free bytes and 1560KB until OOM, target footprint 268435456, growth limit 268435456