Click here to Skip to main content
15,898,937 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
QuestionHandling Arrays inside the Structures in VC++ Pin
Sangeetha.R9-Mar-06 23:49
Sangeetha.R9-Mar-06 23:49 
AnswerRe: Handling Arrays inside the Structures in VC++ Pin
2bee 10-Mar-06 1:31
2bee 10-Mar-06 1:31 
QuestionC++ Console Applications Pin
Dreamspeeder9-Mar-06 22:36
Dreamspeeder9-Mar-06 22:36 
AnswerRe: C++ Console Applications Pin
toxcct9-Mar-06 22:54
toxcct9-Mar-06 22:54 
GeneralRe: C++ Console Applications Pin
Dreamspeeder10-Mar-06 7:00
Dreamspeeder10-Mar-06 7:00 
GeneralRe: C++ Console Applications Pin
georgeraafat10-Mar-06 13:34
georgeraafat10-Mar-06 13:34 
GeneralRe: C++ Console Applications Pin
Saksida Bojan10-Mar-06 19:29
Saksida Bojan10-Mar-06 19:29 
Question.Net Remoting Memory Horror (IPC channel) Pin
2bee 9-Mar-06 20:28
2bee 9-Mar-06 20:28 
Hi,

i have an application which is running as a windows service,
it's purpose is to poll different sensors in a specific interval. No problem so far and with .Net memory profiler i was able to reduce the memory consumption drastically (allocs are almost -> 0 byte/s).

But now the downside, my idea was to present the sensors data on a ASP.NET page. My first thought was using a webservice to connect the windows service with the IIS. However after reading a comparison between Remoting vs. Webservices i decided to do remoting with an IPC channel.

So far so good, i have implemented a very light Remoting object, in addition i use the IPC channel and binary formatters. But when my application was finally running i discoverd that each remoting call will take around 8 KB of memory! Furthermore it allocates at least 178! Instances of differnt .Net classes for each call.

Imagine that i have to update my data on the IIS every second and addionally i have more than one sensor. This would mean for example that 5 Sensors would cost 40 KB or more memory per second, surely the garbage collector will take care of it. But how long will it take until i get in serious memory trouble (like Memory Pressure by the framework)? I saw that the garbage collector is triggered every 10 s in the current setup (without remoting it's between 45 min - 2h)

There are a couple of Questions:

1. Is it possible to reduce the memory consumption of .Net remoting? (i saw no difference between singleton & singecall)

2. Is remoting not the right choice for my task?

BTW: The service is written in C++/CLI, the logic and pages on the IIS are in C#.

I would really appreciate any help! If needed i could also publish some code to resolve the issue.

ThanX Tobias

the remoting Interface (each call of GetIndex costs 8KB):

public interface class IRemotingLink
{
ArrayList^ GetSensorKeys (void);
array <unsigned char>^ GetIndex (String^ pSensorGuid, unsigned char pIndex);
array <array <unsigned char>^>^ GetIndices (String^ pSensorGuid);
bool SetIndex (String^ pSensorGuid, unsigned char pIndex, array <unsigned char>^ pIndexContent);
};


-- modified at 2:34 Friday 10th March, 2006
Question[Message Deleted] Pin
cusack9-Mar-06 17:48
cusack9-Mar-06 17:48 
AnswerRe: problem in tis few question !!! Pin
Cedric Moonen9-Mar-06 20:26
Cedric Moonen9-Mar-06 20:26 
GeneralRe: problem in tis few question !!! Pin
cusack10-Mar-06 18:42
cusack10-Mar-06 18:42 
AnswerRe: problem in tis few question !!! Pin
toxcct9-Mar-06 23:48
toxcct9-Mar-06 23:48 
GeneralV2.1 Pin
Trollslayer10-Mar-06 7:44
mentorTrollslayer10-Mar-06 7:44 
GeneralRe: V2.1 Pin
toxcct10-Mar-06 22:21
toxcct10-Mar-06 22:21 
AnswerRe: problem in tis few question !!! Pin
Professor Sharada Ulhas10-Mar-06 10:49
Professor Sharada Ulhas10-Mar-06 10:49 
GeneralRe: problem in tis few question !!! Pin
cusack10-Mar-06 18:47
cusack10-Mar-06 18:47 
GeneralRe: problem in tis few question !!! Pin
Saksida Bojan10-Mar-06 19:25
Saksida Bojan10-Mar-06 19:25 
Questionconst char __gc[] to const char [] Pin
Fu Manchu9-Mar-06 14:58
Fu Manchu9-Mar-06 14:58 
AnswerRe: const char __gc[] to const char [] Pin
Michael Dunn10-Mar-06 6:47
sitebuilderMichael Dunn10-Mar-06 6:47 
Questioncross-include two classes Pin
shaohao9-Mar-06 4:24
shaohao9-Mar-06 4:24 
AnswerRe: cross-include two classes Pin
toxcct9-Mar-06 4:45
toxcct9-Mar-06 4:45 
GeneralRe: cross-include two classes Pin
shaohao9-Mar-06 5:09
shaohao9-Mar-06 5:09 
GeneralRe: cross-include two classes Pin
toxcct9-Mar-06 5:12
toxcct9-Mar-06 5:12 
GeneralRe: cross-include two classes Pin
shaohao10-Mar-06 3:09
shaohao10-Mar-06 3:09 
GeneralRe: cross-include two classes Pin
georgeraafat10-Mar-06 13:43
georgeraafat10-Mar-06 13:43 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.