Bug 577239 - Reduce memory usage of ScriptItemize
Summary: Reduce memory usage of ScriptItemize
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.22   Edit
Hardware: PC Windows 10
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 577238
  Show dependency tree
 
Reported: 2021-11-12 19:39 EST by Jonah Graham CLA
Modified: 2021-11-12 19:39 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jonah Graham CLA 2021-11-12 19:39:58 EST
Calls to ScriptItemize allocates huge buffers to accommodate for worst case ScriptItemize results all the time.

The design of ScriptItemize is that a "typical" sized buffer is used, and if ScriptItemize returns E_OUTOFMEMORY then the buffer size is increased.

At the moment the size of the buffer is the length of the string (+2) x sizeof SCRIPT_ITEM (which is 8 bytes).