Visit The New, Modern Unix Linux Community

Search Results

Search: Posts Made By: rupeshkp728
Forum: Programming 04-03-2015
1,260
Posted By xbin
If I understand your question correctly then a...
If I understand your question correctly then a good starting point would be

man hier
6,666
Posted By achenle
From my reading of the man page for core, the...
From my reading of the man page for core, the process should be dumping the mmap()'d data, as that's a "file-backed shared mapping". IIRC, POSIX shared memory is implemented as a mmap()'d file. ...
6,666
Posted By Perderabo
Core dump occur as default action of a few...
Core dump occur as default action of a few signals. The list is available with "man -s7 signal" on RedHat. You could install a signal handler to catch all those signals. It could then display...
6,666
Posted By fpmurphy
Which OS and version you are using? I assume...
Which OS and version you are using? I assume Linux since you mention gdb

The /proc/PID/coredump_filter file, available since Linux kernel 2.6.23 can be used to control which memory segments...
Forum: Programming 06-21-2014
1,652
Posted By lsatenstein
When wanting to provide an address to a called pointer
Your code crashes because you are passing the address that "name" is pointing to
which is null.

So what you must do is pass the address of name as

int ConvertIDToName(void *id, void *&name,...
Forum: Programming 06-20-2014
1,652
Posted By Corona688
Why is it 'void' in the first place? Make it a...
Why is it 'void' in the first place? Make it a char **, and no typecasting is necessary.
Forum: Programming 05-23-2014
1,636
Posted By alister
CS and DS do not need a type member. Whenever CS...
CS and DS do not need a type member. Whenever CS and DS are being used directly, the code using them already knows what they are. Only ignorant code inspecting the union needs access to a type flag....
Forum: Programming 05-23-2014
1,636
Posted By Corona688
Did you try the code or just consider it to look...
Did you try the code or just consider it to look wrong...? Why?

The whole point of using a union, and the whole point of adding type to the beginning of your CS and DS structures, was that they'd...
Forum: Programming 05-23-2014
1,636
Posted By techmonk
Modifying the myfunc function changing data->type...
Modifying the myfunc function changing data->type inplace of s->type


void myfunc(S *data)
{
switch(data->type) {
case TYPE_DS:
data->ds.dc=0;
...
Forum: Programming 05-22-2014
1,636
Posted By Corona688
Yes, a union is useful in this situation. ...
Yes, a union is useful in this situation. Specifically:

enum { TYPE_CS, TYPE_DS };

typedef struct CS {
int type;
int cc;
} CS;

typedef struct DS {
int type;
...
Forum: Programming 12-10-2013
758
Posted By blackrageous
What operating system are you using and on what...
What operating system are you using and on what architecture?
2,028
Posted By jim mcnamara
Force a core dump - then examine the core with a...
Force a core dump - then examine the core with a debugger like gdb. If the process is hung it is not working, killing it nicely or killing to force a core dump are both acceptable.
Forum: Programming 10-01-2013
2,072
Posted By alister
If you had posted a complete yet minimal,...
If you had posted a complete yet minimal, compilable program which reproduces the issue, it is likely that this thread would have been resolved long ago.

Regards,
Alister

---------- Post...
Forum: Programming 10-01-2013
2,072
Posted By shamrock
There's something goofy in your program so post...
There's something goofy in your program so post it here so others can look at it...as the max value of ULL "18446744073709551615" is way bigger than "5368709120" so im not sure how you are getting...
Forum: Programming 10-01-2013
2,072
Posted By shamrock
What platform are you on...OS/hardware 32 or 64...
What platform are you on...OS/hardware 32 or 64 bits? and insert the statement below into your source...compile it run it and post its output here...
printf("sizeof ULL is %d bytes\n",...
Forum: Programming 09-30-2013
2,072
Posted By shamrock
Check the return value from strtoull...it is...
Check the return value from strtoull...it is better not to assume anything and make sure to include <stdlib.h> header file wherein strtoull is declared and post the entire code if it aint too big...
Forum: Programming 09-30-2013
2,072
Posted By Don Cragun
Show us the code you used to determine that the...
Show us the code you used to determine that the value stored in num is 1073741824 rather than 5368709120! Decimal 5368709120 is hexadecimal 0x140000000 and decimal 1073741824 is 0x40000000. So,...
Forum: Programming 09-30-2013
2,072
Posted By jim mcnamara
MY this looks familiar: C function "strtoull"...
MY this looks familiar: C function "strtoull" failing (http://cboard.cprogramming.com/c-programming/159459-c-function-strtoull-failing.html)

You are doing yourself and the people who help you a...
9,516
Posted By Praveen_218
Ok. Yes seems to be memory leak case. But then...
Ok. Yes seems to be memory leak case.
But then what is the trigger or is it always expanding in every run?

If you know the trigger which is causing the issue, you would easily zero in on to the...
9,516
Posted By Praveen_218
How do you know the leak is happening? Does...
How do you know the leak is happening?
Does your process crashes everytime it's run after certain time or is there a trigger which results into a crash/abort for "ENOMEM" ??
Forum: Programming 08-27-2013
1,294
Posted By Corona688
That means you cannot store an empty string in...
That means you cannot store an empty string in your array though -- it will be the same as NULL, i.e. first character holding a zero.
Forum: Programming 08-27-2013
1,294
Posted By Corona688
You made it an array of arrays, guaranteeing it...
You made it an array of arrays, guaranteeing it will never be NULL. array[j] just calculates array + (j*50), which isn't going to be zero.

If you want to store a null pointer, you'll have to...
18,157
Posted By wisecracker
Google is your friend here, and there is a lot...
Google is your friend here, and there is a lot about it...

A starter:-

Device mapper - Wikipedia, the free encyclopedia (http://en.wikipedia.org/wiki/Device_mapper)
Forum: Programming 07-01-2013
2,142
Posted By DGPickett
If you are doing simple or poll()/select() driven...
If you are doing simple or poll()/select() driven synchronous blocking I/O, all the errno get the same treatment with different messages.
If you do fcntl O_NONBLOCK (O_NDELAY looks like an old...
Forum: Programming 06-29-2013
2,142
Posted By alister
I'm sure it was just a momentary lapse, but to...
I'm sure it was just a momentary lapse, but to avoid confusing anyone: assigning -1 is a boolean true.

Regards,
Alister
Showing results 1 to 25 of 118

 

Featured Tech Videos

All times are GMT -4. The time now is 02:05 AM.
Unix & Linux Forums Content Copyright 1993-2020. All Rights Reserved.
Privacy Policy