Programming :: Increasing Thread Stack Size?

Jan 23, 2011

I seem to only be able to set my stack size on my linux server to 15000. If I increase it to 20000 I get a Segmentation Fault. how I can get the linux OS to increase the stack size? Code: threadRet |= pthread_attr_setstacksize( &m_ThreadAttributes, 15000 );

View 8 Replies


ADVERTISEMENT

Programming :: Why The Thread Stack Size Cannot Be Changed When Calling In A Dynamic Library

Jan 5, 2011

Why the thread stack size can not be changed after calling pthread_attr_setstacksize & pthread_create in a dynamic library? Detail: I write a file thread_factory.c and plan to build it and produce a dynamic library (libthread_factory.so) In the thread_factory.c , there is a routine

[Code]....

And after this, there is application, it will call fct_thread_create(STACK_SIZE_256KB), and then call pthread_attr_getstacksize(), but the stack size return always be a fixed value 0xa01000. (I tried this on Fedora12) But if I build the application source code with the file thread_factory.c directly, the stack size return is right as my expect. I checked the source code of glibc about the routine pthread_create() as below:

[Code]....

View 7 Replies View Related

Programming :: Rules To Set The Pthread Stack Size - Compute The Memory Needed By Each Thread?

Jul 26, 2010

i have an application that launches several pthreads, i know that the default size used by Linux is 8Mb for each pthread. However i would like to optimize the total memory usage by my application by decreasing the default stack size of each pthread to the needed resources. My questions:

- Are there any rules to set the pthread stack size.
- How to compute the memory needed by each thread.
- Is the malloc call inside a thread counted from the stack size of the same pthread?

View 2 Replies View Related

Ubuntu Servers :: How To Decrease Thread Stack Size

Feb 5, 2010

Desperate to reduce RAM usage of my tiny VPS running Ubuntu 9.04 and Apache2.2.11, here I saw that:
On Linux, each child process will use 8MB of memory by default. This is probably unnecessary. You can decrease the overall memory used by Apache by setting ThreadStackSize used by Apache by setting ThreadStackSize to 1MB in.

So I tried to give the suggestion a try. But when I append:
ThreadStackSize 1000000
in my /etc/apache2/httpd.conf <IfModule mpm_prefork_module> directive, and restarted apache, it failed with this message:
Invalid command 'ThreadStackSize', perhaps misspelled or defined by a module not included in the server configuration

So I figured out that the relevant modules are neither enabled nor available on apache2. Now I am wondering whether there is a way to decrease the ThreadStackSize without the need to compile apache from source? If not, what should I do?

View 1 Replies View Related

Programming :: Thread Stack Using Pthread_attr_setstackaddr()?

Sep 22, 2010

When I set the stack base address of the child thread using the POSIX library function "pthread_attr_setstackaddr()", I am unable to access the memory contents of its parent. The data-structures that are created on the HEAP of its parent using malloc() are either getting destroyed or unaccessible when moving to the context of the child thread. These data-structures are being passed as an argument to the child thread.Even if I make these variables global then also it is not working.pthread_attr_setstacksize(tattr, ...);stackbase = (void *) malloc(...);pthread_attr_setstackaddr(tattr, stackbase);But when I create the child thread without setting its stack base address using that pthread_attr_setstackaddr(), then it is able to access the parent's memory contents.

View 1 Replies View Related

Programming :: Why The Stack Size Limit

May 1, 2011

Why is it in Linux that there is a stack size set by default? And why is it so small? (My system is set to 8192 kbytes.) And why is there a default limit on the stack size when the max memory and virtual memory size are, by default, unlimited? (Aren't they both fed from the same place ultimately?)

Reason I ask: I want to use recursive functions in my programming a lot more. Problem is, if the language (or implementation) doesn't happen to support tail-call recursion, then I can be pretty well certain that the first huge problem that gets thrown at my function is going to kill my program because the stack size limit is going to be quickly reached. Obviously, I can change the stack size limit for my own computers, but it doesn't feel so great knowing that most of the people who copy and execute my code will have probably have overlooked this. Anyway, does anyone know: is this small default stack size limit just one of those historical artifacts, or is there some technical reason for it?

View 5 Replies View Related

Programming :: Resident Set Size Increasing Continuously

Jun 13, 2010

I am working on a C++ application, using the latest Slax as distro and CodeBlocks 8.02 as IDE.

I have a problem that is really biting me hard... And i'm sorry if my questions will sound trivial: i'm still a C++ noob...
Basically,looking with KSysGuard i can notice a constant increment of the VmRss parameter,i.e. the resident set size of my program.

While stepping with the debugger i noticed that the VmRss parameter increases by 4 (KB?) when i push_back into some STL vectors (i have this problem in various parts of the code).

While i analyze the problem with KSysGuard i'm also looking at the /proc/statm file of my process. When KSysGuard shows a VmRss increment by 4, i can actually see an increment (by 1) in the 2nd parameter of that file (which is the resident set size) but not in the 1st parameter (which is the total program size).

What surprises me most is that the VmRss is reported in KB and i really am not pushing 4 KB inside the vector all at once...

So i ask:

1)Is this a memory leak?

2)Why the total program size doesn't increase?

3)To me, it looks like VmRss increases "cumulatively" only after several insertions in the various vectors.

View 3 Replies View Related

Programming :: How To Bind Thread To Specific Thread In Multithread Application?

Dec 25, 2010

I am going to use "pthread_setaffinity_np" to bind a thread to a specific core. My application has two threads. I have used mutex to assign a specific id to each thread and then bind that thread to a core different from another core. but it seems that the os assigns both thread to one core.What should I do to bind each thread to a specific core?

View 4 Replies View Related

General :: How To Get Stack Size Of Running Process?

Apr 17, 2011

Can anyone tell me that how to get information about stack, allocated by kernel to a running process? for this ,is there any api function,any system call is available in ubuntu 8.04 ?

View 2 Replies View Related

General :: Increasing Size Of A Folder?

Jul 28, 2010

As I have a opt/sybase folder in Linxs I want to increase the size of this folder how can I increase it? For example the size we mention at the time of installation Sybase is 2gb now I want to increase by 4gb how can I increase it.

View 2 Replies View Related

Software :: Find The Size Of A Stack When A Process Is Running?

Dec 6, 2010

How do we find the size of a stack when a process is running?

View 1 Replies View Related

Fedora :: Increasing Size Of System Partition?

Jul 29, 2011

I am running Fedora 15 along with Windows 7 on my Dell laptop. Yesterday, when I was trying to install TeX Live, it stopped in between saying that there is no space left in File System. Even though I have space in my hard drive volumes, space seems to be running out of my system partition which is only 9GB in size (I guess!).I am posting a few results that might help you guys. I have an unformatted 15GB partition. How can I add it to my system partition? And is my var folder too big (1.5GB)? If yes, how do I backup its contents and then delete them? Additionally, the File System shows a folder 'media' (89GB) which links the C: drive that contains Windows 7 and my personal files. Should it remain that way or should I separate it? If the latter, how? I just couldn't find any.

Code:
#df -h
Filesystem Size Used Avail Use% Mounted on

[code]....

View 3 Replies View Related

Ubuntu :: Increasing Home Folder Size?

May 17, 2010

i got low space left on my home folder .. i installed ubuntu and set home folder's size to 20 gbs and 70 gbs for my "/" partition , 2gbs for swap.Is there a way to increse those 20 gbs ? maybe take a lil from my "/" partition?

View 2 Replies View Related

General :: Increasing Font Size In Console

Feb 26, 2011

I am using ubuntu lucid.as a desktop and don't run a server. The editor I use is vim so increasing font by edit > profile preferences. What I need to know is how to increase the size in console ie. when I use Ctrl +Alt + F1 to F6. On running xrandr I get this :

[Code]...

I know that,the graphical user interface ( using X windows , I think ) sits on top of the base system ie F1 to F6. In the Fs , xrandr replies "Can't open display ". The question is am I right in thinking that "gui" is totally independant of the base ( is that the correct word ?). I have read that messing about with resolution can wreck a monitor ( I'm using a laptop) , is there a safe way to proceed?

View 5 Replies View Related

General :: Increasing The Swap Partition Size?

Jun 21, 2010

ecently I tried to increase the size of my swap partition using GParted, but it wouldn't let me. I wondering if there was another way? Currently it's 795 MB but I want it to be 1GB

View 3 Replies View Related

Ubuntu Servers :: RAID 5 Failure While Increasing Size?

Sep 6, 2010

Based on the reading I've done over the past 48 hours I think I'm in serious trouble here with my RAID 5 array. I got another 1 TB drive and added to my other 3 to increase my space to 3 TB...no problem.

While the array was resyncing...it got to about 40%, I had a power failure. So I'm pretty sure it failed while it was growing the array...not the partition. Next time I booted mdadm didn't even detect the array. I fiddled around trying to get mdadm to recognize my array, but no luck.

I finally got desperate enough to just create the array again...I knew the settings of my and had seen some people have success with this method. When creating it, it asked me if I was sure because the disks appeared to belong to an array already, but I said yes. The problem is when I created it, it created a clean array and this is what I'm left with.

Code:
/dev/md0:
Version : 00.90
Creation Time : Sun Sep 5 20:01:08 2010
Raid Level : raid5
Array Size : 2930279808 (2794.53 GiB 3000.61 GB)

[Code]....

I tried looking for backup superblock locations using e2fsck and every other tool I could find, but nothing worked. I tried testdisk which says it found my partition on /dev/md0, so I let it create the partition. Now I have a /dev/md0p1, which won't let me mount it either. What's interesting is gparted reports /dev/md0p1 as the old partition size (1.82 TB)...the data has to still be there, right?

View 3 Replies View Related

Server :: Increasing HDD Size While Keeping Data Intact

Jun 15, 2010

I'm currently setting up a server with 2x 1TB disks in raid1. (Centos 5.5)In the future, if the storage is insufficient and I decide to upgrade the disks to 2x 2TB, could I just:

- dump ghost image of the array on usb drive
- replace hdd's and build new array
- ghost array with image created previously

Would the above work, will the new partition automatically resize to 2TB or do I need to partition right now with LVM? would it work with LVM?

View 1 Replies View Related

CentOS 5 :: Slab-cache Increasing Size-2048?

Jun 28, 2010

On a full update centos 5.5 64 bit every day increases slab cache , specialy size-2048 eat a lot of memory ..

how can change this ? maybe a kernel bug ?

cat /proc/slabinfo
slabinfo - version: 2.1
# name <active_objs> <num_objs> <objsize> <objperslab> <pagesperslab> : tunables <limit> <batchcount> <sharedfactor> : slabdata <active_slabs> <num_slabs> <sharedavail>

[Code]....

View 1 Replies View Related

Red Hat :: Find The Dynamic Stack And Heap Size Of A Running Process In Rhel?

Aug 26, 2010

I am trying to find the dyanmic heap size and stack size of a running process in rhel5.5 and rhel6.I read that the 23rd parameter in the file /proc/pid/stat gives the heap size.Can you elaborate more on this.Also is there any other way to do this?

View 5 Replies View Related

Networking :: SO_RCVBUF Does Not Reflect Increasing Listen Queue Size

Jul 9, 2010

In my Solaris tcp client server program, In server side I am checking the size of recv buffer, based on different listen queue size.

I was expecting this size to be increased due to the increase in receive queue size. why the value is same ?

View 1 Replies View Related

SUSE / Novell :: Increasing Size Of A Mirrored Volume In Vxvm?

Apr 6, 2010

is it possible to extend a mirrored veritas volume which has two SAN LUNs each one in a seperate EMC storage box.

i need to add diska -> EMC box1

and diskb -> EMC box 2

then i need to increase the size of the mirrored volume.

View 1 Replies View Related

Software :: Bash Console - Shell - STACK Size: 98222 [0x7f665dbe4e00 0x7f665db25090]

May 14, 2010

i'm getting messages like these in my bash console

Code: STACK size: 98222 [0x7f665dbe4e00 0x7f665db25090] and i'm not quite sure what they mean, so far it looks it's related to the shell stack limit set by ulimit, however i've tried to change it (increasing it) however this message still persists.

View 9 Replies View Related

Ubuntu :: Increasing Harddisk Size Allocated For 10.10 Installed Inside Windows

Jan 27, 2011

I have installed ubuntu 10.10 inside windows 7. I have allocated 15 GB hard disc size for it which is almost filled. So I want to increase the size of hard disc partition allocated for ubuntu 10.10. Can i do that? If yes then how?

View 3 Replies View Related

Ubuntu Installation :: Increasing Size Of Hard Disk Space Allocated For Filesystem?

Jan 4, 2010

I recently installed Bio-Linux 5.0 as a dual boot system with XP for some bioinformatics applications, but Im having some problems with the amount of disk space which can be allocated specifically for the Ubuntu install.

I partitioned a 250 GB portable hard drive into:

/dev/sdb1: 154.76 GiB (with 30 GiB allocated for Ubuntu)
/dev/sdb2 : 78.13 GiB

Ive been using blastclust to analyse some very large data sets, which keeps on crashing due to filesystem running out of disk space.

When I installed Bio-Linux 5.0 from the live cd, the maximum size I could allocate to the install was 30 GiB, and I havent been able to find a way to change this.

Ive tried using System->Administration->Partition Editor using the live cd, and can view / delete the partitions, but I cant find a way to specifically alter the disk space allocation for Ubuntu.

How do I increase the filesystem size to larger than the current 30 GiB?

View 5 Replies View Related

Server :: Squid Servers Cache Size On Disk Automatically Increasing And Decreasing?

Jun 24, 2010

Squid servers cache size ondisk automatically increasing and decreasing,how I would resolve this issue

View 6 Replies View Related

Programming :: Unix Programming - Single Thread Server Can Support Exactly 2 Clients At Once

Sep 28, 2010

A simple TCP based chat server could allow users to use any TCP client (telnet, for example) to communicate with each other. For this question you should consider a single process, single thread server that can support exactly 2 clients at once, the server simply forwards whatever is sent from one client to the other (in both directions). Your server must not insist on any specific ordering of messages as soon as something is sent from one client it is immediately forwarded to the other client. As soon as either client terminates the connection the server can exit

View 4 Replies View Related

Server :: Increasing Size Of Extended Partition To Allow Creation Of New Partition

May 18, 2010

I've got a server that needs more space. To achieve this we added space (by extending the VMware disk attached to it).Normally this isn't an issue, because we just add an new partition and LVM it from there, but this host predates our deployment of LVM everywhere.

Our current theory is that the unallocated sectors can not be assigned because they aren't part of the extended partition, and thus ... we go in a circle.So what i believe the way forward is to extend sda4 so that i can then create an sda10 inside of it. Anyone have any ideas on how to do this? I was thinking gparted may do the trick ... but being a server i'm in runlevel3, with no X...

View 5 Replies View Related

Server :: Increasing Size Of /var Folder Or Mount To Another Folder?

Nov 16, 2010

I'm installing things in a new Red Hat server and saw that the /var folder is full (100%). I need this folder to have more space or another kind of solution because this server is going to be used as a print server.

View 7 Replies View Related

Programming :: Setup A Stack (1kB) For My Module In C?

Sep 6, 2010

I need to call some other functions in "int init_module(void)" and module. So I need a stack. How can I setup a stack (1kB) for my module in C?

View 11 Replies View Related

Programming :: View Stack Of Process?

Mar 1, 2011

If I issue the following and the process doesn't quit, is there a way to view what it's doing with the SIGTERM signal on the stack? Is this done via the pstack command?kill -s SIGTERM <PID>

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved