| | |
Memory Problem After a certain limit
Thread Solved |
•
•
•
•
Try making a smaller example of the problems... that program looks a over complicated. If what you have work's, exept for a few errors, don't worry about changing it. Here's how I would go around doing it:
First read the description file to make a sscanf string, and make two arrays, one to hold the names of the variables, and another to hold the variables. Since the datatype can vary, maybe make the second array an array of pointers.
Next read the data file, record by record and as you index along print out the variables with there names.
Good luck.
Here the problem is not so big.Complie and run the code once.it will work fine.
and its about two functions dont go to the code now just run it and
face the problem then u will definately get sumthing.
Thanks in advance.
Hello Ancient Dragon,
we are operating on UNIX environment.It will be used in UNIX only.
anyways next time onwards will take care about indetation it a word.
can you please go though my problem:
1st compile and run the code as i said in #1. then while running for different files u will face the problem after the column count exceeds 10.
but why only 10???
but both the functions a running fine independently.
check it one please.
we are operating on UNIX environment.It will be used in UNIX only.
anyways next time onwards will take care about indetation it a word.
can you please go though my problem:
1st compile and run the code as i said in #1. then while running for different files u will face the problem after the column count exceeds 10.
but why only 10???
but both the functions a running fine independently.
check it one please.
Last edited by Dream2code; Jul 14th, 2009 at 3:02 am.
You need to post the input data file (zip it up first!) because the program you posted produces these errors on the three example lines you posted in your post #1.
>>record->column_delim=(char**)malloc(10*sizeof(char*));
That line looks awfully suspicious of the reason for your error. It is only allocating room for 10 pointers
•
•
•
•
Dml Error: at line 1
Dml error: Missing ; at line 2
Press any key to continue . . .
•
•
•
•
it works upto 10 columns.
when the column name exceeds 10
it shows "segmentation fault"
That line looks awfully suspicious of the reason for your error. It is only allocating room for 10 pointers
Last edited by Ancient Dragon; Jul 14th, 2009 at 9:05 am.
•
•
•
•
You need to post the input data file (zip it up first!) because the program you posted produces these errors on the three example lines you posted in your post #1.
>>record->column_delim=(char**)malloc(10*sizeof(char*));
That line looks awfully suspicious of the reason for your error. It is only allocating room for 10 pointers
format like
begin
column_1 string("|");
column_2 string("|");
....
column_n string("\n");
end;
at the End of line 2 in the dml a space is there.
"EVERY STATEMENT SHOULD END WITH A SEMICOLON EXCEPT THE BEGIN AND ENSURE THAT NO SPACE SHOULD BE THERE AFTER THE SEMICOLON"
Thats not the program error..its the error of symantic checker of my program.
record->column_delim=(char**)malloc(10*sizeof(char*));
if its the problem then we should not be able to print the informations from the description file.But we can print it.
and i changed this 10 to 1 ..5 ..20..50 ...many times.
M waiting for a miracle.lets see.its actually a strange problem.
Thanks
DP
•
•
•
•
i dont know actually how to use gdb.
please u try once from your side to debug and find the solution.
And please teach to about the usage of gdb.
Thanks,
DP
>>please u try once from your side to debug and find the solution.
DaniWeb is not your a debugger.
description file:
=================
begin
name string("|");
age string("|");
a string("|");
a string("|");
a string("|");
a string("|");
a string("|");
a string("|");
a string("|");
a string("|");
sex string("\n");
end;
data file:
============
x|y|x|a|b|c|d|d|d|a|a|d
x|y|x|a|b|c|d|d|d|a|a|d
x|y|x|a|b|c|d|d|d|a|a|d
x|y|x|a|b|c|d|d|d|a|a|d
anyways u can create any kind of file as per the description file syntax and after that
create any data file as per the description file.
In my post#1 every thing described properly.
In fact it a realtime utility to be used in the server.
=================
begin
name string("|");
age string("|");
a string("|");
a string("|");
a string("|");
a string("|");
a string("|");
a string("|");
a string("|");
a string("|");
sex string("\n");
end;
data file:
============
x|y|x|a|b|c|d|d|d|a|a|d
x|y|x|a|b|c|d|d|d|a|a|d
x|y|x|a|b|c|d|d|d|a|a|d
x|y|x|a|b|c|d|d|d|a|a|d
anyways u can create any kind of file as per the description file syntax and after that
create any data file as per the description file.
In my post#1 every thing described properly.
In fact it a realtime utility to be used in the server.
•
•
•
•
Well why don't you learn how to use gdg? Start with google.
>>please u try once from your side to debug and find the solution.
DaniWeb is not your a debugger.
anyways now i am concentraing on this problem.
Thanks for your advice.
![]() |
Similar Threads
- Physical memory problem (Windows Vista and Windows 7)
- Memory Problem? (C++)
- Dell Inspiron 8200 Memory Problem (Troubleshooting Dead Machines)
- ASUS mainboard memory problem (Motherboards, CPUs and RAM)
- Out Of Memory Problem (C++)
- Weird memory problem in Windows XP (Windows NT / 2000 / XP)
- Problem w/ LIMIT in CASE statement (MySQL)
- Memory problem? (Motherboards, CPUs and RAM)
- memory problem (Motherboards, CPUs and RAM)
Other Threads in the C Forum
- Previous Thread: Finding the number of variables equal to a certain value
- Next Thread: falling letters
| Thread Tools | Search this Thread |
adobe api array arrays binarysearch calculate char cm convert copyanyfile copypdffile cprogramme createcopyoffile createprocess() csyntax directory dynamic feet fflush file floatingpointvalidation fork forloop frequency getlasterror givemetehcodez global graphics gtkgcurlcompiling hacking hardware highest homework i/o inches incrementoperators intmain() iso kernel kilometer km linked linkedlist linux linuxsegmentationfault list locate logical_drives loopinsideloop. match matrix microsoft motherboard mqqueue mysql oddnumber odf open opendocumentformat opensource openwebfoundation owf pattern pdf performance pointer posix power probleminc program programming pyramidusingturboccodes read recursion recv recvblocked repetition research scanf scheduling segmentationfault send shape socketprograming socketprogramming stack standard strchr string suggestions systemcall test unix urboc user variable voidmain() wab win32api windows.h






