mitchell:

Is there a recommended limit? I was thinking of making it the size of an
int or unsigned int. Could this become a memory issue?

  The bufferSize is used on the next line to allocate that number of
bytes as a buffer. 4000 was a size that seemed to maximize speed
without allocating too much memory. If you mean
'bufferSize=sizeof(int)' which is likely to mean 'bufferSize=4' then I
expect that would be a bit slow and may not even work. If you mean
'bufferSize=2**32' then its untenable as 4 gigabytes can not be
allocated. Its even worse on 64 bit platforms. Accessors are often
allocated on the stack and on Windows you may only get 1 megabyte of
stack (on Linux its often 8 or 10 megabytes) and this code may be
reentered so I don't normally allocate more than 64K on the stack in
any function.

  Neil
_______________________________________________
Scintilla-interest mailing list
[email protected]
http://mailman.lyra.org/mailman/listinfo/scintilla-interest

Reply via email to