473,486 Members | 1,950 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

IIS 6 / native memory question

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
May 10 '07 #1
3 1632
"Scott McFadden" <no**************@criticaltech.comwrote in message
news:uN**************@TK2MSFTNGP02.phx.gbl...
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?
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
May 10 '07 #2
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
"Carl Daniel [VC++ MVP]" <cp*****************************@mvps.org.nospam >
wrote in message news:%2****************@TK2MSFTNGP06.phx.gbl...
"Scott McFadden" <no**************@criticaltech.comwrote in message
news:uN**************@TK2MSFTNGP02.phx.gbl...
>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?

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


May 10 '07 #3
"Scott McFadden" <no**************@criticaltech.comwrote in message
news:eH**************@TK2MSFTNGP04.phx.gbl...
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
May 10 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
5284
by: Dan | last post by:
Hi Gurus I got a very basic question to ask: When a .NET exe (MSIL) is first run, the JIT-compiler will converts the IL into native codes so that it can executes on the current machine. my...
1
2034
by: dln | last post by:
Hey all. I'm a bit new to the language and I'm trying to figure out how to have my c# application interact with native code that is exported via a dll. I've run into a problem interfacing with a...
3
1846
by: -DG- | last post by:
I'm still trying to figure out some of the nuances of access to legacy Win32 DLLs. I need to alloc buffers to be used by the Win32 DLLs. I know that pinning a managed pointer can lead to...
3
1417
by: Xavi Sam | last post by:
Hi When I build my asp.net application the ASP.NET generates a net.assembly by page in the directory of my pc: C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files Theese...
8
3627
by: quortex | last post by:
Hi all, I have a native class which has a single instance controlled via the singleton pattern. I need to call this from both native C++ and from mixed mode visual studio 2005 c++ CLI. At...
1
2114
by: s_schutte | last post by:
Here's my situation. I have an unmanaged C++ project that I am using to interface with the Lotus Notes C API. I then have a managed C++ project in the same solution that functions as a "C++...
7
8091
by: Russell Mangel | last post by:
/* Hi, I am trying to hold a reference to un-managed pointer IStorage. The client/callers will make many accesses to IStorage, but only in-directly. For performance reasons IStorage needs to...
14
7509
by: Ben Voigt | last post by:
Under certain circumstances I get: First-chance exception at 0x7c812a5b (kernel32.dll) in LTMGUI.exe: 0xC0020001: The string binding is invalid. First-chance exception at 0x7c812a5b (kernel32.dll)...
2
1935
by: Andreas Schmitt | last post by:
Crazy idea but... I think everyone could agree with the statement that the CLI standard Base Class Library is incredibly useful, not to mention the extentions by microsoft and managed directX...
0
1606
by: walve_wei | last post by:
<1>use the D3D control panel, enable the debug DLL and maximum validation,for D3D control panel ,you need to install the directx sdk. <2>Start up the debug monitor (<MSVC install...
0
6964
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7123
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7173
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6839
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7305
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5427
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4559
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3070
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
598
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.