🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #9254

Re: Thread and memory

#9254
From: Remy Lebeau (TeamB)
Date: Tue, 20 Jul 2004 17:38
23 lines
2040 bytes
"Sara T." <sarana@infoquest.co.th> wrote in message
news:40fcc5b3@newsgroups.borland.com...

> Although I call a lot of times as following:

That code is fine as long as you don't need to access the thread after you
have resumed it, since you are using pointers that are local to the loop and
go out of scope quickly.

> I observe again and fould usually Virtual Memory has nerver been
decreased.
> it takes 500MB and adding a Physical Memory 350 MB, that's all around 1GB.
> It makes a resource of the machine unusually and found the error "Thread
> creation error: Not enough storage is available to process this command"

Then you probably aren't terminating and freeing your threads ever - or -
the threads themselves are doing something during their Execute() code that
is eating up all of the available memory.  Perhaps your actual thread code
has leaks of its own?  Hard to say since you haven't shown any of your code.


Gambit
Technical Details
Message-ID: <40fd586e$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!news.zanker.org!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <40fb3d08@newsgroups.borland.com> <40fbf87b$1@newsgroups.borland.com> <40fbfd74$1@newsgroups.borland.com> <40fc1022$1@newsgroups.borland.com> <40fcab00@newsgroups.borland.com> <40fcb75c$1@newsgroups.borland.com> <40fcc5b3@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,d35c53850c011fac
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Remy Lebeau \(TeamB\)" <gambit47.no.spam@no.spam.yahoo.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References:  <40fb3d08@newsgroups.borland.com> <40fbf87b$1@newsgroups.borland.com> <40fbfd74$1@newsgroups.borland.com> <40fc1022$1@newsgroups.borland.com> <40fcab00@newsgroups.borland.com> <40fcb75c$1@newsgroups.borland.com> <40fcc5b3@newsgroups.borland.com>
Subject: Re: Thread and memory
Date: Tue, 20 Jul 2004 10:38:46 -0700
Lines: 25
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
NNTP-Posting-Host: 68.69.17.41
Message-ID: <40fd586e$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1090345070 68.69.17.41 (20 Jul 2004 10:37:50 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!news.zanker.org!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail