Re: [Mono-dev] Application uses 5x more memory on Linux than on Window

2011-03-17 Thread Miguel de Icaza
> Actually there is no problem letting the application run on linux (it's
> using nhibernate, log4net and many other libraries).
> But I noticed a huge memory usage difference. If I'm compiling the
> application on my Windows system and let it run, it consumes up to 40mb
> ram (Release without debug information, csc).
> On Linux (Ubuntu 10.10 Mono 2.6.7 ) it consumes 200mb.

You could try a more recent version of Mono, there have been 24 months
of improvements since the 2.6 codebase was released.

Once you upgrade to something like Mono 2.10, try using the new
profiler to find what is consuming that memory.

Miguel
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-dev] Application uses 5x more memory on Linux than on Window

2011-03-17 Thread Steve
Hello,

I'm developing a console application with Visual Studio 2010.
The final aim is to run the application as a service/daemon on a Linux
system, but I'm developing on Windows as Visual Studio has a lot of
benefits.

Actually there is no problem letting the application run on linux (it's
using nhibernate, log4net and many other libraries).
But I noticed a huge memory usage difference. If I'm compiling the
application on my Windows system and let it run, it consumes up to 40mb
ram (Release without debug information, csc).
On Linux (Ubuntu 10.10 Mono 2.6.7 ) it consumes 200mb.

Does anyone know why there is such a huge difference and can explain me why?

P.S.: I used xcopy deployment till now and I haven't tried compiling it
with mono yet.

Best regards
Steve
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-dev] Is there a Visual studio project?

2011-03-17 Thread Adam Balan
I am wondering if anyone has built the source into a visual Studio 2008/10
solution or if there is one for developing mono on windows

 

You have received this message from:

 

Adam Kyle Balan

 

Ph: (403) 465-4776

Other Email: adamkyleba...@gmail.com

 

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] CurrentDomain.BaseDirectory when embedding

2011-03-17 Thread Steve Baer
Thanks Jonathan, your suggestion appears to have fixed this. I wrote a console 
application that did absolutely nothing and called mono_jit_exec on it. Now I 
see that the default AppDomain has a BaseDirectory set.

-Steve


From: Jonathan Chambers 
Sent: Friday, March 11, 2011 4:27 PM
To: Steve Baer 
Cc: mono-devel-list@lists.ximian.com 
Subject: Re: [Mono-dev] CurrentDomain.BaseDirectory when embedding

Steve, 

I believe you need to call mono_jit_exec to properly initialize the runtime. If 
you don't have a Main method for you application since you are embedding, just 
create an empty one in your assembly that can be invoked. After the call to 
mono_jit_exec things should be setup properly.

http://www.mono-project.com/Embedding_Mono#Initializing_the_Mono_runtime

Thanks,
Jonathan


___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-dev] GSoC 2011 - Interest

2011-03-17 Thread Abdul Rauf
Dear Team Mono,


I am very excited to contribute in open source community through the
platform of Google Summer of Code 2011. I have visited the web page
of “Mono” at http://mono-project.com/Gsoc and have seen project ideas for
GSoC 2011. I am interested in two projects. The reason for my interest is
that I have previously worked on .NET related projects both in VB and C# and
want to develop skills of IDE development. I am writing you to let you know
my understanding of the project and required knowledge of technologies. I
would like your feedback on it. My understanding of the requirements is as
follows:


“Debugger Visualizer”


1.  Implement a debugger visualizer (Can “Debugger Visualizer” template from
.NET framework be used?)

2.  A DataType assembly will be loaded into the debugger visualizer at
runtime and display the desired properties in a presentable form.

3.  I need to specify which visualizers are to be implemented.


“Translation Resources Editor”


1. Implement an editor for different language resources to help people edit
resources files without modifying XML files directly.

2. The program should load strings from .resx file and provide an interface
to enter the required translations.


Also, it says "Should extend or share code with the Gettext addin." I am not
quite sure about this at the moment. Does it mean that this Resource Editor
is required to be integrated with Gettext? Any help is appreciated in this
regard.


Could you please suggest me some pointers to start working with?



Regards

Rauf Butt

University of Gloucestershire
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] [PATCH] Replace ENABLE_COREE with a runtime switch.

2011-03-17 Thread Gonzalo Paniagua Javier
On Mon, 2011-03-07 at 14:11 -0600, Vincent Povirk wrote:
> This patch mostly reverts 666d37829304e85f72969c44e92bc11ca167a272,
> which put Mono's mixed-mode support in #ifdef ENABLE_COREE, disabling
> it by default on Windows.
> 
> It was disabled because it broke the verifier, and it still does.
> 
> Since most of the new behavior is dependent on whether coree has been
> hooked, or whether a particular image has been loaded using the OS
> loader, skipping the hook step effectively disables coree at runtime.
> So this patch moves that step out of mono_init_internal and into
> mono_main, where it is dependent on a runtime switch.
> 
> Even if this didn't break the verifier, I think it's an intrusive,
> hacky change to how Mono loads things that almost no one needs, and so
> having it default off makes sense. Also, (my real motive) it's a step
> towards my goal of getting Wine's builtin mscoree.dll to use Mono's
> mixed-mode support without indirectly causing itself to be hooked.

Anyone? If nobody complains, I'll check this in...

-Gonzalo


___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Embedding Mono

2011-03-17 Thread vinay_rk
Hi Robert,

Thanks for the suggestion... I tried a slight modification of what you
posted..  : mono_set_dirs (NULL, NULL);   so that the default paths from the
installation is applied. My use cases guarentee a Mono framework installed
on OSX so I can safely do this. 

Regards
-Vinay

--
View this message in context: 
http://mono.1490590.n4.nabble.com/Embedding-Mono-tp3345310p3384443.html
Sent from the Mono - Dev mailing list archive at Nabble.com.
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] [PATCHES] Improve process exit/wait handling

2011-03-17 Thread Rodrigo Kumpera
Hi Rolf,


Reviewing *0004-io-layer-Improve-waiting-on-processes-a-lot.patch:*
*
*
*
*
+ // Ensure we're not in here in multiple threads at once, nor recursive.
+ if (InterlockedIncrement (&mono_processes_cleaning_up) > 1) {
+ InterlockedDecrement (&mono_processes_cleaning_up);
+
Use the standard idiom of CAS (&zzz, 0, 1) instead of doing 2 atomic ops.


+ if (mono_processes_soft_lock != 0) {
+ /* The sigchld handler is watching us. Spin a bit and try again */
+ _wapi_handle_spin (1);
+ } else {

This code doesn't make much sense to me. You spin with
the mono_processes_mutex lock held
only to drop it later to reacquire straight away. You must use an
exponential backoff since the other
thread might be blocked for a significant amount of time.

Overall the patch is ok, thou I have two comments, first that the style of
reclamation is kludgy, we
would be better with SMR; second that, if I understand correctly, we only
free process data when its
managed object is collected or another process is spawned, right?

On other notes, your code mixes C and C++ styles comments, stick with C
style, please. You're
not following our code conventions in a few places too:

+static void mono_processes_cleanup (void)

Should be:
static void
mono_processes_cleanup (void)
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Embedding Mono

2011-03-17 Thread Robert Jordan
On 17.03.2011 11:01, vinay_rk wrote:
> Hi,
>
> I' am compiling my App from MonoDevelop (with Gcc under the hood). I tried
> using mono_assembly_setrootdir to set the path to the mono Libraries where
> MonoPosixHelper.dll and libMonoPosixHelper.dylib are present but it doesn't
> change anything, I still get the dll not found exception. I also tried
> mono_config_parse with a dll map element to Map MonoPosixHelper to
> libMonoPosixHelper.dylib. This didn't help either.
>
> Regarding Otool and install_name_tool etc I am not able to follow the
> suggestions regarding them since I' am not familiar with Mac OSX
> development. I mainly develop on windows platform but am working on Mac now
> to make one of our apps cross platform.
>
> What else should I try now.. ??

Try this (before initializing the root domain):

mono_set_dirs ("/path/to/mono's/lib", "/path/to/mono's/etc");
mono_config_parse (NULL);

Robert

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Embedding Mono

2011-03-17 Thread vinay_rk
Hi,

I' am compiling my App from MonoDevelop (with Gcc under the hood). I tried
using mono_assembly_setrootdir to set the path to the mono Libraries where
MonoPosixHelper.dll and libMonoPosixHelper.dylib are present but it doesn't
change anything, I still get the dll not found exception. I also tried
mono_config_parse with a dll map element to Map MonoPosixHelper to
libMonoPosixHelper.dylib. This didn't help either. 

Regarding Otool and install_name_tool etc I am not able to follow the
suggestions regarding them since I' am not familiar with Mac OSX
development. I mainly develop on windows platform but am working on Mac now
to make one of our apps cross platform.

What else should I try now.. ??

Regards
-Vinay

--
View this message in context: 
http://mono.1490590.n4.nabble.com/Embedding-Mono-tp3345310p3384079.html
Sent from the Mono - Dev mailing list archive at Nabble.com.
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list