0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

C++ Builder 10.2 Tokyo > EOutOfMemoryが起きる条件 > TStringGrid | TStringListでSaveToFile()

Last updated at Posted at 2020-05-14
動作環境
RAD Studio 10.2 Tokyo Update 3
4GB RAM

EOutOfMemoryが出る条件

EOutOfMemoryが発生する条件を調べてみた。
環境によって変わるので、目安としての情報である。

TStringGrid

  • 20万レコード x 10カラム: OK
  • 100万レコード x 10カラム: OK
  • 500万レコード x 10カラム: EOutOfMemory

それぞれのカラムには20文字の文字列を設定

TStringListのSaveToFile()

上記で生成したTStringGridの文字列をTStringListに入れてSaveToFile()した。

  • 100,000 : OK
  • 300,000 : OK
  • 500,000 : EOutOfMemory
  • 1000,000 : EOutOfMemory

関連

備考

エラーが出るAPIについてはそれ以外の実装で回避できるかもしれないが、普段使っているものとして上記を調べた。

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?