Sponsored Content
Full Discussion: Segmentation Faults
Top Forums Programming Segmentation Faults Post 99423 by blowtorch on Friday 17th of February 2006 03:59:26 AM
Old 02-17-2006
Segmentation faults occur when the program tries to access some memory that it isn't supposed to. Often happens when you have a loop that doesn't end when it is supposed to and goes on to try and access unavailable memory.
 

9 More Discussions You Might Find Interesting

1. HP-UX

Copy on Write page faults

Hello Please can you tell me how to access COPY ON WRITE page faults in HP -UNIX. I found the structure in /usr/include/sys/vmmeter with the structure name vmmeter. Please tell me the function to fill the values to this structure and also the arguments for function.:: (5 Replies)
Discussion started by: manjunath
5 Replies

2. HP-UX

Intransient blocking page faults

Hi, Will anybody tell me what is this 'intransient blocking page faults' in HP-UX, it is in the structure _pst_vminfo in the header file /ust/include/sys/pstat/vm_pstat_body.h? (4 Replies)
Discussion started by: sushaga
4 Replies

3. AIX

High Page Faults

Sorry my poor english In 570 pseries nmon shows excessive page faults, ascents of something more than 30000 Page faults. System: AIX 5.2 ML5 Processor Type: PowerPC_POWER5 Number Of Processors: 2 Processor Clock Speed: 1656 MHz CPU Type: 64-bit Kernel Type: 64-bit Memory Size: 2816 MB ... (1 Reply)
Discussion started by: daviguez
1 Replies

4. AIX

Lots of page faults and free memory

Hello, I've been reading your forums for quite a while and the great amount of information I find here always come in hand.This time however, I need some specific help... I have a doubt with an AIX server which I'm failing to understand as I'm new to its concept of memory management... ... (8 Replies)
Discussion started by: flpgdt
8 Replies

5. AIX

Lots of page faults on AIX mySQL lpar

Hi, OS = AIX 5.3 Large number of page faults recently start to occure on AIX 5.3 lpar with mysql database installed. I need help in setting AIX OS parameter to solve the paging problem and some guidance on interpreting my stats t Code: # vmstat... (5 Replies)
Discussion started by: crosys
5 Replies

6. Programming

Using gdb, ignore beginning segmentation fault until reproduce environment segmentation fault

I use a binary name (ie polo) it gets some parameter , so for debugging normally i do this : i wrote script for watchdog my app (polo) and check every second if it's not running then start it , the problem is , if my app , remain in state of segmentation fault for a while (ie 15 ... (6 Replies)
Discussion started by: pooyair
6 Replies

7. AIX

AIX 7.1 high page faults

hi guys i hope you can help me with this situation. i have 2 lpar with aix 7.1 and oracle 11gr2 in grid mode. when i start nmon to check the current system health i notice that page fault are over 3000/s. than i have opened a case with ibm and they say that the problem is not paging nor... (10 Replies)
Discussion started by: gullio23
10 Replies

8. Solaris

Page faults on OS

Hi guys, I have a zone on a M5000 server running solaris 10. The zone has an SAP application running on it and facing some performance issues. As part of the troubleshooting, I've been recommended to look for any paging on the OS. Please advise how to look for the paging. I've been looking at... (4 Replies)
Discussion started by: frum
4 Replies

9. Programming

C. To segmentation fault or not to segmentation fault, that is the question.

Oddities with gcc, 2.95.3 for the AMIGA and 4.2.1 for MY current OSX 10.14.1... I am creating a basic calculator for the AMIGA ADE *NIX emulator in C as it does not have one. Below are two very condensed snippets of which I have added the results inside the each code section. IMPORTANT!... (11 Replies)
Discussion started by: wisecracker
11 Replies
ARGZ_ADD(3)						     Library Functions Manual						       ARGZ_ADD(3)

NAME
argz_add, argz_add_sep, argz_append, argz_count, argz_create, argz_create_sep, argz_delete, argz_extract, argz_insert, argz_next, argz_replace, argz_stringify - functions to handle an argz list SYNOPSIS
#include <argz.h> error_t argz_add(char **argz, size_t *argz_len, const char *str); error_t argz_add_sep(char **argz, size_t *argz_len, const char *str, int delim); error_t argz_append(char **argz, size_t *argz_len, const char *buf, size_t buf_len); size_t argz_count(const char *argz, size_t argz_len); error_t argz_create(char * const argv[], char **argz, size_t *argz_len); error_t argz_create_sep(const char *str, int sep, char **argz, size_t *argz_len); error_t argz_delete(char **argz, size_t *argz_len, char *entry); void argz_extract(char *argz, size_t argz_len, char **argv); error_t argz_insert (char **argz, size_t *argz_len, char *before, const char *entry); char * argz_next(char *argz, size_t argz_len, const char *entry); error_t argz_replace(char **argz, size_t *argz_len, const char *str, const char *with, unsigned int *replace_count); void argz_stringify(char *argz, size_t len, int sep); DESCRIPTION
These functions are glibc-specific. An argz vector is a pointer to a character buffer together with a length. The intended interpretation of the character buffer is array of strings, where the strings are separated by NUL bytes. If the length is nonzero, the last byte of the buffer must be a NUL. These functions are for handling argz vectors. The pair (NULL,0) is an argz vector, and, conversely, argz vectors of length 0 must have NULL pointer. Allocation of nonempty argz vectors is done using malloc(3), so that free(3) can be used to dispose of them again. argz_add() adds the string str at the end of the array *argz, and updates *argz and *argz_len. argz_add_sep() is similar, but splits the string str into substrings separated by the delimiter delim. For example, one might use this on a Unix search path with delimiter ':'. argz_append() appends the argz vector (buf,buf_len) after (*argz,*argz_len) and updates *argz and *argz_len. (Thus, *argz_len will be increased by buf_len.) argz_count() counts the number of strings, that is, the number of NUL bytes, in (argz,argz_len). argz_create() converts a Unix-style argument vector argv, terminated by (char *) 0, into an argz vector (*argz,*argz_len). argz_create_sep() converts the NUL-terminated string str into an argz vector (*argz,*argz_len) by breaking it up at every occurrence of the separator sep. argz_delete() removes the substring pointed to by entry from the argz vector (*argz,*argz_len) and updates *argz and *argz_len. argz_extract() is the opposite of argz_create(). It takes the argz vector (argz,argz_len) and fills the array starting at argv with point- ers to the substrings, and a final NULL, making a Unix-style argv vector. The array argv must have room for argz_count(argz,argz_len) + 1 pointers. argz_insert() is the opposite of argz_delete(). It inserts the argument entry at position before into the argz vector (*argz,*argz_len) and updates *argz and *argz_len. If before is NULL, then entry will inserted at the end. argz_next() is a function to step trough the argz vector. If entry is NULL, the first entry is returned. Otherwise, the entry following is returned. It returns NULL if there is no following entry. argz_replace() replaces each occurrence of str with with, reallocating argz as necessary. If replace_count is non-NULL, *replace_count will be incremented by the number of replacements. argz_stringify() is the opposite of argz_create_sep(). It transforms the argz vector into a normal string by replacing all NULs except the last by sep. RETURN VALUE
All argz functions that do memory allocation have a return type of error_t, and return 0 for success, and ENOMEM if an allocation error occurs. BUGS
Argz vectors without final NUL may lead to Segmentation Faults. NOTES
These functions are a GNU extension. Handle with care. SEE ALSO
envz(3) ARGZ_ADD(3)
All times are GMT -4. The time now is 02:08 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy