88ee2eddb0
LexerStylerArray contains a MAX_LEXER_STYLE-element array (currently 100) of LexerStyler objects. Every one of them in turn via inheritance from StyleArray contains a SCE_STYLE_ARRAY_SIZE-element array (I tested with 99) of Style objects each at least 56 bytes in size. This in my test case requires over 550k of memory, and if LexerStylerArray is allocated on stack, the stack becomes corrupted. (Ref: https://github.com/notepad-plus-plus/notepad-plus-plus/issues/10454#issuecomment-908732786) Inline arrays are a part of an object and increase its size while std::vector uses memory from the heap and stores internally only a pointer to a chunk of memory, thus the size of an object with a vector is substantially smaller than the one with an inline array. (Ref: https://github.com/notepad-plus-plus/notepad-plus-plus/issues/10454#issuecomment-908780106) Fix #10454, fix #10206 |
||
---|---|---|
.. | ||
BoostRegexSearch.h | ||
ILexer.h | ||
ILoader.h | ||
Platform.h | ||
SciLexer.h | ||
Sci_Position.h | ||
Scintilla.h | ||
Scintilla.iface | ||
ScintillaWidget.h |