Eric Pouech eric.pouech@wanadoo.fr writes:
+static struct assembly* add_assembly(struct actctx* actctx, enum assembly_type at) +{
- struct assembly* assembly;
- if (!actctx->num_assemblies)
actctx->assemblies = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(struct assembly));
- else
actctx->assemblies = HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
actctx->assemblies,
(actctx->num_assemblies + 1) * sizeof(struct assembly));
Growable arrays should be grown by a multiple of the current size.