Failed to set dynamic section sizes: Memory exhausted

Viewed 437

I have a project that is big (and already works on windows) and I am trying to compile to Android 32/64 bits in Delphi RIO 10.3.3

When building to RELEASE configuration, it does compile sucessful.

However this project crashes at startup. It used to work on Tokyo but I never made a real attempt to delivery for my customers.

Now I want to deploy and need to debug it.

I get the "Failed to set dynamic section sizes: Memory exhausted" everytime that I build to debug. In 32 or 64 bits options.

I have tried to reduce DEBUG options one by one gradually and recompiling and always get the same error.

What other options do I have? I read in some other answers about using GOLD as linker, is it a option for DELPHI ?

1 Answers

I guess you may have some too big static variable array (a global array) for this target.

Something like

{$ifdef DEBUG}
var maybetoobig: array[0..1 shl 30] of byte;
{$endif}

Which will reserve 1GB of static memory, which may be fine on Windows, but not allowed on mobile targets.

Try to circumvent the error code by creating a new project and adding units one by one.

  • Then check the global variables;
  • Or check what in the unit may involve too much information.

You may also try to use external debugging symbols.

Related