Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.clipper.visual-objects > #4186 > unrolled thread

Dynamic Memory of STRING

Started byPhil bayard <philbayard@gmail.com>
First post2012-09-28 04:22 -0700
Last post2012-09-28 14:29 +0000
Articles 5 — 2 participants

Back to article view | Back to comp.lang.clipper.visual-objects


Contents

  Dynamic Memory of STRING Phil bayard <philbayard@gmail.com> - 2012-09-28 04:22 -0700
    Re: Dynamic Memory of STRING Phil bayard <philbayard@gmail.com> - 2012-09-28 04:52 -0700
    Re: Dynamic Memory of STRING Phil bayard <philbayard@gmail.com> - 2012-09-28 06:45 -0700
      Re: Dynamic Memory of STRING Phil bayard <philbayard@gmail.com> - 2012-09-28 07:04 -0700
      Re: Dynamic Memory of STRING "Wolfgang Riedmann" <wriedmann@gmail.com> - 2012-09-28 14:29 +0000

#4186 — Dynamic Memory of STRING

FromPhil bayard <philbayard@gmail.com>
Date2012-09-28 04:22 -0700
SubjectDynamic Memory of STRING
Message-ID<99ee7ffb-6b91-4846-952b-22f19974d237@googlegroups.com>
Hi Everyone!

I have a problem when trying to analyse mail which have size of more than 4 mb.
I was using Memoread to read mail from .eml file but it did reach limit because of memory. So i writed a MemoRead2 with Fread method and it seems to set the problem of memoread.

But when i now use a 10mb .eml file, i got in trouble when doing At3 function on my 10mb string during the analysis of the file.

Maybe i use all the memory during my manipulation (Substr, At3, ... ) on 10mb string and the garbage collector cannot free memory fast enough? 

Does anyone already had this problem?

[toc] | [next] | [standalone]


#4187

FromPhil bayard <philbayard@gmail.com>
Date2012-09-28 04:52 -0700
Message-ID<083dc41f-2472-40a2-aff2-fd5a1faef093@googlegroups.com>
In reply to#4186
Le vendredi 28 septembre 2012 13:22:34 UTC+2, Phil bayard a écrit :
> Hi Everyone!
> 
> 
> 
> I have a problem when trying to analyse mail which have size of more than 4 mb.
> 
> I was using Memoread to read mail from .eml file but it did reach limit because of memory. So i writed a MemoRead2 with Fread method and it seems to set the problem of memoread.
> 
> 
> 
> But when i now use a 10mb .eml file, i got in trouble when doing At3 function on my 10mb string during the analysis of the file.
> 
> 
> 
> Maybe i use all the memory during my manipulation (Substr, At3, ... ) on 10mb string and the garbage collector cannot free memory fast enough? 
> 
> 
> 
> Does anyone already had this problem?

In fact, the program crash when i do a lower of my 10mb string. I supposed that the lower function in VO28RUN use some Memoread or some stuff like that. Lets try rewriting a lower method until the next crash ;)

[toc] | [prev] | [next] | [standalone]


#4188

FromPhil bayard <philbayard@gmail.com>
Date2012-09-28 06:45 -0700
Message-ID<a72f1210-186e-47e8-9a63-fec85e6eba45@googlegroups.com>
In reply to#4186
I finally found a way to do it...

I did add SetMaxDynSize(100663296 ) to my start() function and it allows 10MB strings...

To set it to 96 Mb = 12 MB
But my exe now use about 140 MB of memory where he was using something like 40 MB.

It will not be good for my users in terminal servers to have 3x more ram used. Isnt here another way to up that memory whitout a that growing memory program.

[toc] | [prev] | [next] | [standalone]


#4189

FromPhil bayard <philbayard@gmail.com>
Date2012-09-28 07:04 -0700
Message-ID<cb5d6336-624b-454f-b4f2-acce5960337f@googlegroups.com>
In reply to#4188
Well, SetMaxDynSize(67108864) seems to be enough, and my exe grows only up to 50 MB of memory... 

Everything seems allright ! 
Thanks for reading my today's story

Phil.

[toc] | [prev] | [next] | [standalone]


#4190

From"Wolfgang Riedmann" <wriedmann@gmail.com>
Date2012-09-28 14:29 +0000
Message-ID<aclqi2Fqsk4U1@mid.individual.net>
In reply to#4188
Hi Phil,

if you are working on very big strings it would be worth to write your
own string manipulation functions that are working with pointers.

All VO functions will do a lot of memory allocation and release.

Wolfgang

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.clipper.visual-objects


csiph-web