MAXALLOC is defined only in debug builds (checked and fastchecked), not
in retail (free).  The comment in utilcode.h is relevant:

00222 #ifdef MAXALLOC
00223 // these defs allow testers to specify max number of requests for
an allocation before
00224 // returning outofmemory
00225 void * AllocMaxNew( size_t n, void **ppvCallstack);
00226 class AllocRequestManager {
00227   public:
00228     UINT m_newRequestCount;
00229     UINT m_maxRequestCount;
00230     AllocRequestManager(LPCTSTR key);
00231     BOOL CheckRequest(size_t n);
00232     void UndoRequest();
00233 };
00234 #endif

It is testing tool that forces the garbage collector to return
out-of-memory artificially.  If you set m_MaxRequestCount to 25, then
the first 24 allocations will succeed, and the 25th and all subsequent
allocations will fail.

So no, there is no need to include this in an alternate heap manager.

Barry

-----Original Message-----
From: Discussion of the Rotor Shared Source CLI implementation
[mailto:[EMAIL PROTECTED] On Behalf Of Archana
Sent: Monday, July 12, 2004 4:34 AM
To: [EMAIL PROTECTED]
Subject: [DOTNET-ROTOR] purpose of MAXALLOC?

hi,
 what is the purpose of MAXALLOC, AllocRequestManager?
do we have to include them if we plug ina different heap manager?
Thanks
archana

===================================
This list is hosted by DevelopMentor(r)  http://www.develop.com
ASP.NET courses you may be interested in:

Guerrilla ASP.NET
15 March 2004, in Boston, MA
17 May 2004 in Torrance, CA
7 June 2004, London, UK

http://www.develop.com/courses/gaspdotnetls

View archives and manage your subscription(s) at
http://discuss.develop.com

===================================
This list is hosted by DevelopMentorŪ  http://www.develop.com
ASP.NET courses you may be interested in:

Guerrilla ASP.NET
15 March 2004, in Boston, MA
17 May 2004 in Torrance, CA
7 June 2004, London, UK

http://www.develop.com/courses/gaspdotnetls

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to