memory

tomcat memory issue

I am having more than 150 web applications in my tomcat web-apps directory can these be the one of the reason for increase in memory usage. i have installed tomcat as a service . ...

Why does some sfr in 8051 are bit addressable?

Hello, According to this: http://www.8052.com/tutsfr.php , the sfrs whose address are divisible by 8 are bit addressable. You can do things like SETB or CLR on them. But aren't they overlap other memory addresses? I mean, for example, P0 is in 80h. So P0.0 will be 80h, P0.1 will be 81h. But 81h is the address of SP. Aren't they overlap?...

Why do compilers allow string literals not to be const?

And where are literals in memory exactly? (see examples below) I cannot modify a literal, so it would supposedly be a const char*, although the compiler let me use a char* for it, I have no warnings even with most of the compiler flags. Whereas an implicit cast of a const char* type to a char* type gives me a warning, see below (tested...

Expected segmentation fault, as soon as assigning a value to index 1?

Hello, In the code snippet, I expected a segmentation fault as soon as trying to assign a value to count[1]. However the code continues and executes the second for-loop, only indicating a segmentation fault when the program terminates. #include <stdio.h> int main() { int count[1]; int i; for(i = 0; i < 100; i...

Is there a function to set a process stack/heap memory allocation?

I know this is an OS function. But is there a way of increasing your overall stack or heap size through C? sbrk() is used to change the size of data segment right? Does this imply both stack and heap? ...

Viewing data in memory window

why can't I see the variable 'x' in memory window of VS2005 while stepping the code using debugger? int main() { char *c = "String"; //visible char x = 'a'; // not visible } ...

Can I use tmpfs in this way?

I have plenty of RAM on my development machine. Can I move my Rails' application sources to the tmpfs partition in order to gain performance boost because of in-memory storage which is order of magnitude faster than HDD? I understand that tmpfs is temporary storage by its nature BUT can I use it for this task if I'll write some script ...

calling class-specific operator new

The expression operator new(sizeof(T)) allocates T bytes via ::operator new, correct? Is there any way to call the class-specific version of operator new if it exists, exactly the way how new T() allocates memory (before calling the constructor)? T::operator new(sizeof(T)) gives a compile-time error if T does not define operator new, e...

Android: Image cache stategy and memory cache size

Hi Guys! I'm implementing an image cache system for caching downloaded image. My strategy is based upon two-level cache: Memory-level and disk-level. My class is very similar to the class used in the droidfu project My downloaded images are put into an hashmap and the Bitmap objet is wrapped inside a SoftRererence object. Also every ...

How can I interface an ARM chip with an external memory chip?

I have finished a project using an LPC2132 and quickly ran into problems with not having enough RAM (64k). For my next project, I'd like to avoid this problem all together by picking a chip that can interface with an external, larger memory chip. How can I do this or where are some resources that I could read up on this at? (I already ...

Memory issues: Should I be writing to file/database if I'm using swap? (Python)

I'm creating and processing a very large data set, with about 34 million data points, and I'm currently storing them in python dictionaries in memory (about 22,500 dictionaries, with 15 dictionaries in each of 1588 class instances). While I'm able to manage this all in memory, I'm using up all of my RAM and most of my swap. I need to b...

Does a memory_limit set in included script apply to a complete request?

When I set ini_set('memory_limit', '100M'); in an included script, does this apply to the complete request, in which this script is included? ...

memory limits and application pool recycle

my web applications app pool configuration is PeriodicRestartMemory : 512000 PeriodicRestartPrivateMemory : 196608 although the virtual memory limit is higher than private memory, app pool is recycled with virtual memory limits exceeded errors in the event log (instead of private memory). what is the reason for this? how could it exce...

Is there a way to limit the amount of memory that "git gc" uses?

I'm hosting a git repo on a shared host. My repo necessarily has a couple of very large files in it, and every time I try to run "git gc" on the repo now, my process gets killed by the shared hosting provider for using too much memory. Is there a way to limit the amount of memory that git gc can consume? My hope would be that it can t...

Got segfault on a macbook pro with a 24+bits indexed array

I am using GCC + the terminal to make an array of prime numbers. I once asked on #[email protected], but I still don't understand: An int can store values on 32 bits (so a total of 2^32 unique values), but can't an array have more than 2^24 values ? I'm not sure, but is http://stackoverflow.com/questions/2318278/why-24-bits-registers...

PHP: return var doesn't work when var is huge?!

so i am using PHPExcel (http://phpexcel.codeplex.com/) to import a excel sheet. everything works fine on my development system, BUT it doesn't quite work on the live system. hence i debugged and looked what could be wrong. i got to a point where i found that a method obviously returned NULL, where it should have returned an object. i lo...

How to get a large integer as input and store it in memory

I know that performing arithmetic on large integers in brainfuck, while perhaps quite tedious at times, is entirely possible. However what I'm wondering about is what the generally acceptd best-practices are for taking in large integers (or even strings, I suppose) as input. Most compilers/interpreters allow you to provide full strings...

Do I've to free mysql result after storing it?

Hi, I was wondering whether or not I've to call the $stmt->free_result() for after I've stored it's result with $stmt->store_result()? Could I rather just call $stmt->close() on the end? The reason why I'm asking it is because when I call the $stmt->num_rows I've to call the $stmt->store_result() as said here: http://www.php.net/manual...

gdb & finding out when a memory address is written to

I am trying to figure out when a certain memory address is written to. I have tried couple of different loops in gdb but it never stoped. Any ideas? Ex: (gdb) while *0x68181b88 == 0 > step > end PS: This is a mips linux system. Edit: My MIPS does not have hw support/registers to watch memory values. Although watch works, it takes ab...

Why can't I create an object greater than 2GB in size in .NET, even on x64?

After reading Are C# Strings (and other .NET API’s) limited to 2GB in size? I played around with large strings and arrays in .NET 3.5. I found that the largest array I could allocate was int.MaxValue - 56 bytes. Similar thing for strings: the largest I could get was (int.MaxValue - 58) / 2 characters (since each character took 2 bytes). ...