Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / May 2007

Tip: Looking for answers? Try searching our database.

IIS 6 / native memory question

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Scott McFadden - 10 May 2007 20:27 GMT
When I run my 32 bit VC 8 DLL hosted by a managed C++ Winform APP on Win2003
32 bit with 4GB ram it runs fine.  When I run the same DLL hosted under a
Managed C++ ASP.NET 2.0 Webservice project (also on Win2003 bit with 4GM
ram, the DLL fails).  If i downgrade the box from 4GB of RAM to 2GB of RAM,
the DLL works fine under IIS.

What kind of issue is this?  Is this an IIS limitation, a Windows
limitation, or VC limitation?

thanks

ScottM
Carl Daniel [VC++ MVP] - 10 May 2007 21:56 GMT
> When I run my 32 bit VC 8 DLL hosted by a managed C++ Winform APP on
> Win2003 32 bit with 4GB ram it runs fine.  When I run the same DLL hosted
[quoted text clipped - 4 lines]
> What kind of issue is this?  Is this an IIS limitation, a Windows
> limitation, or VC limitation?

Impossible to say without a much better description of "the DLL fails".

When the machine is configured with 4GB of memory, is it booting with /3GB?
If so, then it's possible that some address used by the DLL (could be code
or data) has an address above 2Gb, and that such a large address causes a
problem with some logic in the DLL.   Such addresses will appear to be
negative numbers if accessed as an integer.  (The possibility for such
errors is why there's a special linker flag /LARGEADDRESSAWARE to let a
process access user-mode memory about 2Gb).

-cd
Scott McFadden - 10 May 2007 22:35 GMT
Oops..  Calloc failures when running on Win2003 with 4GB ram.

So do I need to set the boot.ini flag and link with the /LARGEADDRESSAWARE
option or is one or the other sufficient?

Also, Got any links or info on Application Memory Tuning?

thanks!

ScottM

So I need to set the OS to boot with the /3GB switch and link with the
>> When I run my 32 bit VC 8 DLL hosted by a managed C++ Winform APP on
>> Win2003 32 bit with 4GB ram it runs fine.  When I run the same DLL hosted
[quoted text clipped - 16 lines]
>
> -cd
Carl Daniel [VC++ MVP] - 10 May 2007 23:16 GMT
> Oops..  Calloc failures when running on Win2003 with 4GB ram.

I'm not sure what you mean - are you saying that you're seeing failures from
calloc with large memory?  If so, that's certainly a bug - all of the
parameters to calloc are pointers or size_t, which is unsigned.

> So do I need to set the boot.ini flag and link with the /LARGEADDRESSAWARE
> option or is one or the other sufficient?

You have to use both the boot.ini flag and the linker option to actually get
access to >2Gb address space.  If you're not doing that, then this probably
isn't your problem.

> Also, Got any links or info on Application Memory Tuning?

Nothing jumps to mind - maybe someone else will have a nice collection of
links.

-cd

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.