Error rlink32 out of memory

[DCC Error] E2161 Error: RLINK32: Out of memory! Delphi Решение и ответ на вопрос 513390

3 / 3 / 2

Регистрация: 08.04.2011

Сообщений: 23

1

06.03.2012, 15:15. Показов 5076. Ответов 2


При компиляции вылаиет такая ошибка (сабж), да у меня много данных храниться в ресурсах, но при это раньше норм компилировалось, а теперь не хочет.

Данные в основном большие текстовые файлы, хранящиея в коллекциях.

Можно ли как-нибудь обойти?

__________________
Помощь в написании контрольных, курсовых и дипломных работ, диссертаций здесь



0



13091 / 5872 / 1706

Регистрация: 19.09.2009

Сообщений: 8,808

06.03.2012, 16:12

2

Эта ошибка возникает в случае, если программа запросила у системы блок памяти некоторого размера, а система такой блок выделить не смогла. Ещё может быть такая ситуация — для некоторого объекта требуется непрерывная область памяти, но именно непрерывный участок менеджер памяти предоставить не может. Например, некоторые системные DLL загружаются примерно в середину адресного пространства, выделенного процессу. Это иногда не позволяет размещать в памяти большие массивы, например.
В общем, вывод такой — слишком большие объекты грузятся в память, либо, объекты требуют слишком больших непрерывных участков для своего размещения в памяти.



0



Эксперт Pascal/Delphi

1131 / 612 / 129

Регистрация: 13.02.2009

Сообщений: 3,504

23.09.2012, 03:38

3

Цитата
Сообщение от i386
Посмотреть сообщение

При компиляции вылаиет такая ошибка (сабж), да у меня много данных храниться в ресурсах, но при это раньше норм компилировалось, а теперь не хочет.

Данные в основном большие текстовые файлы, хранящиея в коллекциях.

Можно ли как-нибудь обойти?

Модуль подключени между собой и все модуль подключение на главное форму на { Form1} и какой то форму не запускается . Бывает когда { Начинаешь писать программу} и заказчик меняет проект, когда переделаешь программу . читай это ошибку до конца ! по любому покажет какой Forma нету в порядке ! и отключите от главную Form

Миниатюры

[DCC Error] E2161 Error: RLINK32: Out of memory!
 

[DCC Error] E2161 Error: RLINK32: Out of memory!
 



0



IT_Exp

Эксперт

87844 / 49110 / 22898

Регистрация: 17.06.2006

Сообщений: 92,604

23.09.2012, 03:38

3

Go Up to Using ILINK32 and ILINK64 on the Command Line

When using the RAD Studio ILINK32 or ILINK64, you may receive the Fatal: Out of memory message. To handle it, you need to identify the Linker heap that is out of memory and increase its size.

To increase the memory size in the needed heap, do the following:

1. Go to Tools > Options > IDE > Compiling and Running.
2. To see which Linker heap caused the problem, select Diagnostic on the Verbosity menu.
3. Try to link again, and when you see the Fatal: Out of memory message, click the Output tab. It contains additional information that identifies which Linker heap was overrun.
4. On the Output tab, find the following line:

Overrun on linker heap:
The heap that you see after the Overrun on linker heap: message is the heap that was overrun.
Values for all heaps are listed below this line. Please see the example below.

  • Look at the two hex values following the heap that is overrun.
  • The first value shows the size required by the linker when it realized that the heap would be overrun.
  • The second value shows the allocated size.
  • Compare the first and second values and pick a value for the heap that exceeds the first value.

Handling errors.png
5. Now, you can increase the size of the needed heap. To do it, go to Project > Options > C++ Linker and in the Linker Heap Settings section, set the new heap size.

  • For the 32-bit Windows platform, there are 5 heaps. In most cases, it’s enough to increase 3 of them: Code Heap Size, Data Heap Size, or Info Heap Size. Please see the sample values used in a reported test case:
  • Code Heap Size: 0x14000000
  • Data Heap Size: 0x0d000000
  • Info Heap Size: 0x0B000000
  • RO Data Heap Size: 0
  • TDS Heap Size: 0
  • For the 64-bit Windows platform, there are 14 heaps. In most cases, it’s enough to increase 2 of them: Dwarf pubtypes Heap Size, or Dwarf aranges Heap Size. Please see the sample values used in a reported test case:
  • Code Heap Size: 0
  • Data Heap Size: 0
  • Dwarf abrbrev Heap Size: 0
  • Dwarf aranges Heap Size: 0
  • Dwarf info Heap Size: 0
  • Dwarf line Heap Size: 0
  • Dwarf loc Heap Size: 0
  • Dwarf macinfo Heap Size: 0
  • Dwarf pubtypes Heap Size: 0x02400000
  • Dwarf ranges Heap Size: 0
  • Dwarf str Heap Size: 0x08000000
  • Info Heap Size: 0
  • RO Data Heap Size: 0
  • TDS Heap Size: 0
C++Linker.png

6. Try to link again. In case you see the Fatal: Out of memory message again, repeat the procedure because you might need to increase the memory for other heaps too.

Note: Each application requires increasing different heaps and different values.

Command-Line Flags

In a command-line build, the linker will emit a table like the following example:

Turbo Incremental Link64 6.80 Copyright (c) 1997-2017 Embarcadero Technologies,
Inc.
Overrun on linker heap: info
Linker Heaps
------------
info                   0x12271000  0x12000000
code                   0x0487d000  0x08000000
rodata                 0x00159000  0x06000000
data                   0x029bb000  0x08000000
bss                    0x08000000  0x08000000
dwarf_aranges          0x00010000  0x00200000
dwarf_macinfo          0x00010000  0x00200000
dwarf_pubtypes         0x00275000  0x02000000
dwarf_info             0x04e57000  0x06000000
dwarf_abbrev           0x00040000  0x00200000
dwarf_line             0x0124d000  0x02000000
dwarf_str              0x036e0000  0x06000000
dwarf_loc              0x00070000  0x02000000
dwarf_ranges           0x00275000  0x02000000
Fatal: Out of memory

You can change the heap sizes the linker uses via the -GH flag for ilink32 or ilink64. Use -GH<heapname>=size to allocate a larger heap or multiple heaps. For example, to link the release version of the DLL OWLNext library, internal C++Builder developers use -GHinfo=0x13000000.

See Also

  • Using ILINK32 and ILINK64 on the Command Line
  • Technical Details About ILINK32 and ILINK64
  • C++ Linker
Today I tried to compile a delphi project with a huge resource file and received the following error message:

[DCC Fehler] E2161 Error: RLINK32: Out of memory!

The resource file was created with brcc32 without errors. It contains 360 resources with a total of 475 MB of memory.

Additional Informations:

IDE = Embarcadero® Delphi® 2010 Version 14.0.3513.24210 
OS = Windows 7 Ultimate x64 (Windows 7 6.1 Build 7600)
RAM = 12 GB, avail 11.3 GB

brcc32.exe / 19. August 2009 / 169.008 Bytes
rlink32.exe / 19. August 2009 / 75.264 Bytes

Looks like I'm very close to the limitation (if there is any), cause when I reduce the size of the resource file to ~430 MB or less I don't get any errors.

Are there known issues or known limitations? Any ideas or workarounds? BTW, splitting up the single file into multiple smaller files doesn't help, same error.

I doubt there is a "natural" limitation, cause the problem occurs somewhere in the bracket of 430..475 MB size of the resource file with no 2^x values inside the range.

Thank you very much

Uwe

11/12/2009 3:47:50 PM

Uwe Kuhring wrote:

> Today I tried to compile a delphi project with a huge resource file
> and received the following error message:

Purely out of curiosity how long does an exe that size take to load?
I've never seen an exe that big.

-- 
-Mike (TeamB)

Mike

11/12/2009 4:20:07 PM

> {quote:title=Mike Williams (TeamB) wrote:}{quote}
> Uwe Kuhring wrote:
> 
> > Today I tried to compile a delphi project with a huge resource file
> > and received the following error message:
> 
> Purely out of curiosity how long does an exe that size take to load?
> I've never seen an exe that big.
> 
> -- 
> -Mike (TeamB)

Depends. Loading the file from a state of the art SSD drive takes about 3 seconds. Loading from standard usb 2.0 drives will take more than a minute.

Uwe

Uwe

11/12/2009 4:30:53 PM

"Uwe Kuhring" wrote in message news:[email protected]
> Today I tried to compile a delphi project with a huge resource file and 
> received the following error message:
>
> [DCC Fehler] E2161 Error: RLINK32: Out of memory!
>
> The resource file was created with brcc32 without errors. It contains 360 
> resources with a total of 475 MB of memory.


One solution is to put the resources in one or more DLLs instead of the main 
application. The main app can easily load resources (images, etc) from the 
"resource-only" DLLs.

-- 
Wayne Niddery (TeamB)

Wayne

11/12/2009 5:36:56 PM

Uwe Kuhring wrote:

> Today I tried to compile a delphi project with a huge resource file and
> received the following error message:

> [DCC Fehler] E2161 Error: RLINK32: Out of memory!

> RAM = 12 GB, avail 11.3 GB

Looks like Embarcadero needs 64bit Delphi to create a linker that can actually
use those 12GB on your system ;)

Jan Derk

Jan

11/12/2009 5:58:54 PM

> {quote:title=Wayne Niddery wrote:}{quote}
> "Uwe Kuhring" wrote in message news:[email protected]
>
> One solution is to put the resources in one or more DLLs instead of the main 
> application. The main app can easily load resources (images, etc) from the 
> "resource-only" DLLs.
> 
> -- 
> Wayne Niddery (TeamB)

Well, I agree, this should work. But putting the resources in multiple DLLs would have downsides:

- You have to divide the resoures into several groups without knowing the group limitations. So you either risk out of memory errors or create more DLLs than necessary.
- If single resources have to be exchanged or updated, things getting more complicated, cause you have to locate the appropriate resource DLL. You need some extra management here
- The advantage of resource files is partially lost, cause with this method you will have several external files. Probably that's exactly the thing you don't want to have.

Alternatively it is possible to create a single archive file containing all resources and read the required data from this archive at runtime. So no extra management for different DLLs would be needed. But again you would have at least two different files. Is there any way to put all the stuff into a single exe? In the past it was possible to append self defined data structures to an existing delphi exe. You had to open the exe at runtime and read data from the original end of the program. Actually this c
ant be done any more because this is the way some link virusses work and your customers will get a lot of annoying heuristic virus warnings when installing and/or starting such modified executables.

You have to go an official way...  Looks like resources files can't be used for huge amounts of data. Is there anything (official) left?

Thank you, Uwe

Edited by: Uwe Kuhring on Nov 12, 2009 11:28 AM

Uwe

11/12/2009 7:29:20 PM

Uwe Kuhring wrote:

> Today I tried to compile a delphi project with a huge resource file
> and received the following error message:
> 
> [DCC Fehler] E2161 Error: RLINK32: Out of memory!
> 
> The resource file was created with brcc32 without errors. It contains
> 360 resources with a total of 475 MB of memory.
> 
> Additional Informations:
> 
> IDE = Embarcadero® Delphi® 2010 Version 14.0.3513.24210 
> ...
> Looks like I'm very close to the limitation (if there is any), cause
> when I reduce the size of the resource file to ~430 MB or less I
> don't get any errors.
> 
> Are there known issues or known limitations? Any ideas or
> workarounds? BTW, splitting up the single file into multiple smaller
> files doesn't help, same error.

I am not aware of a limitation. I guess there is a problem with a least
one of your resources. You could try to find them and if you're
successful then you should create a QC report for the problem.

BTW, Delphi/RAD Studio 2010 Update 2 will hopefully released soon.
http://blogs.embarcadero.com/nickhodges/2009/11/13/39332

The list of fixed bugs doesn't contain your issue, but it's worth to
try it again with Update 2.
-- 
Uwe

Uwe

11/15/2009 10:47:15 AM

> {quote:title=Uwe Schuster wrote:}{quote}
>
> I am not aware of a limitation. I guess there is a problem with a least
> one of your resources. You could try to find them and if you're
> successful then you should create a QC report for the problem.
> 
> BTW, Delphi/RAD Studio 2010 Update 2 will hopefully released soon.
> http://blogs.embarcadero.com/nickhodges/2009/11/13/39332
> 
> The list of fixed bugs doesn't contain your issue, but it's worth to
> try it again with Update 2.

I don't think it's a problem with one of the resources, cause when I split them into two groups of resources, each group compiles well. So at least the problem is not independent from the sequence of the resource files which is no property of any resource file. Thank you for the link. I will try again with Update 2. 

I will flag the question as answered now, cause we found another way to integrate the resources. Thank you all for your answers.

Uwe

Uwe

11/24/2009 11:16:37 PM

Similar Posts:

  • Generating Datamodule
  • E2161 Error: RLINK32: Out of memory
  • E2161 Error: RLINK32: Out of memory!
  • Getting [dcc32 Error] E2161 Error: RLINK32: Error opening file Urgent [Edit]
  • Delphi 2010: [DCC Fatal Error] F2084 Internal Error: AV00000000-R00000000-0
  • Delphi 2010: [DCC Fatal Error] F2084 Internal Error: AV00000000-R00000000-0
  • Delphi XE: [DCC Fataler Fehler] F2084 Interner Fehler: AV221F6F4A-R00000014-0
  • Delphi 7 IDE
  • Delphi 2009 error starting IDE
  • Delphi XE Out Of Memory Error [Edit]
  • Delphi Xe IDE error [Edit]
  • Delphi XE5 DCC Error E2597
  • Opendialog error in IDE and Delphi XE
  • Help Delphi 2010 IDE
  • Error, Error and more errors
  • Delphi 2009 IDE errors
  • error error error
  • memory, memory, memory
  • [Delphi XE2] Tabs on IDE positioning error
  • errors errors errors..
  • Delphi XE IDE code parser error ?!? [Edit]
  • Delphi XE3 and [dcc32 Fatal Error] F2046 Out Of Memory
  • «displayNotification: Out of memory» error on IDE launch
  • Out Of Memory error after converting web services from Delphi 7 to 2009

 
-=Zerg=-
 
(2004-02-12 10:50)
[0]

Я хочу включить в свою программу несколько больших AVI-файлов в качестве ресурсов и еще кучу всякой всячины. Но когда размер ЕХЕ-шника начинает приближаться к определенному критическому (примерно 375 Мб), дельфи выдает ошибку RLINK32: Out Of Memory! и отказывается делать ЕХЕ-шник.

Помогите, как сделать так, чтобы можно было продолжать работу и привысить этот критичекий размер и продолжать получать работающие ЕХЕ-шники?


 
Андрей Сенченко
 
(2004-02-12 11:02)
[1]

???????????????????????????

Но когда размер ЕХЕ-шника начинает приближаться

к определенному критическому (примерно 375 Мб)

???????????????????????????

Простите, вы уверены что Вам это нужнО ?


 
-=Zerg=-
 
(2004-02-12 11:05)
[2]

Да, уверен, очень


 
TUser
 
(2004-02-12 11:53)
[3]

Это ветка из будущего. Задолго после .NET. Там такие размеры — в порядке вещей. ^)

А серьезно — посмотрите на какую-нибудь прогу, которая тоже использует хотя бы сколько-нибудь картинок/мультиков. Если их много — они всегда в отдельных файлах.


 
Anatoly Podgoretsky
 
(2004-02-12 12:30)
[4]

Поставь еще пару линеек памяти


 
-=Zerg=-
 
(2004-02-12 12:32)
[5]

Линеек памяти хватает, и к тому же виртуальная должна подсобить.

Так что это не из-за ОЗУ


 
KosilkA
 
(2004-02-12 15:11)
[6]



> TUser © (12.02.04 11:53) [3]



у меня есть база данных по телефонам.Сама программа (екзешник) весит ~130 метров :)


 
KSergey
 
(2004-02-12 15:26)
[7]

> [6] KosilkA © (12.02.04 15:11)



Это меньше критической массы ;)


 
Карелин Артем
 
(2004-02-12 15:56)
[8]

у меня есть телефонная база в exe. Занимает 650 мегов.


 
-=Zerg=-
 
(2004-02-13 08:21)
[9]

Нет, ребята, давайте решать поставленный вопрос, а не хвастаться своими прогами!


 
Babay
 
(2004-02-13 08:40)
[10]

Н..да..

Одни заботятся об уменьшении размера ехе, а другие наоборот увеличивают….

НАША ЦЕЛЬ ЕХЕ РАЗМЕРОМ НА ВЕСЬ ВИНТ!!!

ну просто нет слов

[1] полностью прав. А нужно ли это?????


 
-=Zerg=-
 
(2004-02-13 10:21)
[11]

Не на весь винт, а по крайней мере до размера CD.

Слушайте, хватит критики, таков заказ! Так поставлена задача!

Кто-нибудь даст РЕАЛЬНЫЙ совет как эту проблему решить, или умеем только пускать насмешки?


 
Семен Сорокин
 
(2004-02-13 10:34)
[12]

2-=Zerg=-

вытащи ресурсы в Dll, если отдельно хранить не хочешь.


Понравилась статья? Поделить с друзьями:
  • Error returns parameter should be blank except inside a function ahk
  • Error returning reference to temporary
  • Error returned from external package is unwrapped
  • Error returned from avr gcc exe
  • Error returned error unknown account