Sponsored Content
Full Discussion: memory stack problem
Top Forums Programming memory stack problem Post 80456 by jim mcnamara on Monday 8th of August 2005 01:25:09 PM
Old 08-08-2005
I think data adjacent to the pointer is overwriting the pointer in question - it's a so-called one-off error. One byte off - you are writing the LSB of a longword pointer.

The only way to fix this is to get into gdb, then examine the pointer after every line
of code is executed - just after you load the struct in get_dsp_data.
 

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

stack problem

Hi, I'm a complete beginner at all this business so any help is appreciated. I have a script (not written by me) which I need to modify. My problems is.... tail -1c $file .... I understand this will return the final character of the $file variable. I need to make it return the first... (4 Replies)
Discussion started by: mastaCow
4 Replies

2. Programming

how to round up a memory address(memory alignment problem)

Hi, I try to marshal a unsigned int and a char * into a buffer, and then unmarshal them later to get them out. I need to put the char * in the front and unsigned int at the end of the buffer. However, my system always give me "BUS ERROR". I am using Sun Sparcs Sloris 2.10. My code to marshal... (6 Replies)
Discussion started by: nj302
6 Replies

3. UNIX for Dummies Questions & Answers

memory stack

Hello everbody: when issuing the ulimit -a, on my tru64 machone, I get the following: root@billing4# ulimit -a time(seconds) unlimited file(blocks) unlimited data(kbytes) 10485760 stack(kbytes) 32768 memory(kbytes) 10190528 coredump(blocks) 0... (1 Reply)
Discussion started by: aladdin
1 Replies

4. Programming

what is stack winding and stack unwinding

helo can u tell me what do you mean by stack winding and stack unwinding Regards, Amit (2 Replies)
Discussion started by: amitpansuria
2 Replies

5. HP-UX

Problem with stack overflow

Hi, I get a problem with stack overflow on HP-UX, when running a C program. Pid 28737 received a SIGSEGV for stack growth failure. Possible causes: insufficient memory or swap space, or stack size exceeded maxssiz. The possible cause i found, was that the definition of a structure had... (0 Replies)
Discussion started by: karthikb23
0 Replies

6. UNIX for Dummies Questions & Answers

Stack Memory

I have a java process that piles up the stack memory. ulimit -a core file size (blocks, -c) unlimited data seg size (kbytes, -d) unlimited file size (blocks, -f) unlimited open files (-n) 1024 pipe size (512 bytes, -p) 10 stack size ... (9 Replies)
Discussion started by: mohtashims
9 Replies

7. UNIX for Dummies Questions & Answers

Kernel Stack vs User Mode Stack

Hi, I am new to the linux kernel development area. I want to know what is the difference between kernel mode stack and user mode stack? Does each process has a user mode stack and a kernel mode stack?? Or Each process has a user mode stack and there is only one kernel mode stack that is shared by... (4 Replies)
Discussion started by: saurabhkoar
4 Replies

8. Android

32MB USB Memory Stack Not Supported on Android?

Running latest Android for Galaxy Tab 8.9 and bought a 32GB USB flash memory stick for file transfers, etc. Would not work. Searched the net for clues and could not find any. Then, back at the IT store, found out that Galaxy Tab currently only supports up to 16GB for the USD flash memory stick.... (0 Replies)
Discussion started by: Neo
0 Replies
pthread_attr_setstackaddr(3)				     Library Functions Manual				      pthread_attr_setstackaddr(3)

NAME
pthread_attr_setstackaddr - Changes the stack address attribute of the specified thread attributes object. LIBRARY
DECthreads POSIX 1003.1c Library (libpthread.so) SYNOPSIS
#include <pthread.h> int pthread_attr_setstackaddr( pthread_attr_t *attr, void *stackaddr); STANDARDS
Interfaces documented on this reference page conform to industry standards as follows: IEEE Std 1003.1c-1995, POSIX System Application Program Interface PARAMETERS
Address of the thread attributes object whose stack address attribute is to be modified. New value for the stack address attribute of the thread attributes object specified by attr. DESCRIPTION
This routine uses the value specified in the stackaddr argument to set the stack address attribute of the thread attributes object speci- fied in the attr argument. When creating a thread, use a thread attributes object to specify nondefault values for thread attributes. The stack address attribute of a thread attributes object points to the origin of the stack for a new thread. The default value for the stack address attribute of an initialized thread attributes object is NULL. For your program to calculate a value for the stackaddr attribute, note that: Your program must allocate the memory that will be used for the new thread's stack. On Tru64 UNIX, to create a new thread using a thread attributes object, the stackaddr attribute must be an address that points to the high-memory end of the memory region allocated for the stack. This address must point to the highest even-boundary quad- word in the allocated memory region. Also note that: If you use the pthread_attr_setstackaddr(3) routine to set a thread attributes object's stack address attribute and use that attributes object to create a new thread, DECthreads ignores the attributes object's guard- size attribute and provides no thread stack guard area for the new thread. If you use the same thread attributes object to create more than one thread and each created thread uses a nondefault stack address, you must use the pthread_attr_setstackaddr(3) routine to set a unique stack address attribute value for each new thread created using that attributes object. NOTES
Correct use of this routine depends upon details of the target platform's stack architecture. Thus, this routine cannot be used in a por- table manner. The size of the stack must be at least PTHREAD_STACK_MIN bytes (see pthread.h). However, because DECthreads must use a portion of this stack memory to begin thread execution and to maintain thread state, your program's "user thread code" cannot rely on using all of the stack memory allocated. RETURN VALUES
If an error condition occurs, this routine returns an integer value indicating the type of error. Possible return values are as follows: Successful completion. ERRORS
None RELATED INFORMATION
Functions: pthread_attr_getguardsize(3), pthread_attr_getstackaddr(3), pthread_attr_getstacksize(3), pthread_attr_init(3), pthread_attr_setguardsize(3), pthread_attr_setstacksize(3), pthread_create(3) Manuals: Guide to DECthreads and Programmer's Guide delim off pthread_attr_setstackaddr(3)
All times are GMT -4. The time now is 07:49 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy