🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Thread creation error: not enough memory

#10291
From: Eugene Mayevski [SecureBlackbox]
Date: Thu, 22 Apr 2004 13:29
20 lines
2140 bytes
Remy Lebeau (TeamB) wrote:

> You never said how many threads you were actually trying to run at a time.
> The error in question occurs when the Win32 API function CreateThread()
> fails, which means that the OS's kernel was not able to create a new thread
> object.  That does not necessarily mean that heap or virtual memory is at
> fault, you may have simply tried to start too many threads and the OS
> couldn't handle that many.

OS doesn't have a serious limit (i.e. it is possible to create more than 
2K threads), but 2K of TThread really would cause a memory shortage 
before thread limit is reached. so of two reasons lack of virtual memory 
is more probable. Another one is that handles are not freed properly and 
system runs out of handle space (which is memory too).

-- 
Eugene Mayevski
EldoS Corp., CTO
Security and networking solutions
http://www.eldos.com
Technical Details
Message-ID: <4087c8af$2@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <4086696d$1@newsgroups.borland.com> <40867831@newsgroups.borland.com> <408698f3@newsgroups.borland.com> <4086abc6$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,c8565ce6e82c46dd
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2004-04-22 06:40:18 PST
Date: Thu, 22 Apr 2004 16:29:09 +0300
From: "Eugene Mayevski [SecureBlackbox]" <mayevski@eldos.org>
Organization: EldoS Corporation
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624
X-Accept-Language: en-us, ru, en
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: Thread creation error: not enough memory
References: <4086696d$1@newsgroups.borland.com> <40867831@newsgroups.borland.com> <408698f3@newsgroups.borland.com> <4086abc6$1@newsgroups.borland.com>
In-Reply-To: <4086abc6$1@newsgroups.borland.com>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 82.144.222.199
Message-ID: <4087c8af$2@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1082640559 82.144.222.199 (22 Apr 2004 06:29:19 -0700)
Lines: 21
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail