Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
I'm doing aproximation of derivative called five-point stencil. For every value of x, in interval [a,b], in step of 0.1 i need to calculate derivative.
2. Relevant commands, code, scripts, algorithms:
The equation is like this:
I want to calculate every of theese, so first, sec, third.... expression and then at the end calculate derivative.
3. The attempts at a solution (include all code and scripts):
4. Complete Name of School (University), City (State), Country, Name of Professor, and Course Number (Link to Course):
I'm studying physics in Rijeka, University of Rijeka, Croatia, but it's not for exact course, I'm doing it because I want to learn...
Currently I test a shared library vendor provided in linux , the following is the simple source :
#include <iostream>
using namespace std;
extern int test1();
extern int test2();
int main()
{
cout << "hello world" << endl ;
return 0 ;
cout << "Test 1" << endl;
... (6 Replies)
I am facing a problem of memory corruption. The loop runs for the first time but does not go through the second time. What could be the problem?
for(int z=0;z<2;z++)
{
fp=fopen("poly.dat","r");
/*do something which reads this file into a 2D array*/
fclose(fp);
... (10 Replies)
I have to debug a function getopt_long in glibc-2.11.3-17.31.1.
For that how can I download and install its corresponding glibc-debug on SLES 11? (8 Replies)
*** glibc detected *** ./a.out: malloc(): memory corruption (fast):
Posted A minute ago
M trying to make multiway tree and dont know what happend when this part of code get executed:
01void ins(NODE *ptr)
02{
03 //working
04 if(ptr!=NULL)
05 {
06 SNODE *var=NULL;
07 var=(SNODE... (3 Replies)
Here is a simple program to find the vowels in the string.
Output is fine.
But I'm getting GLIBC detected as shown below : :eek:
*** glibc detected *** ./VOWELS: free(): invalid pointer: 0x08b82013 ***
======= Backtrace: =========
/lib/libc.so.6
/lib/libc.so.6(cfree+0x59)
./VOWELS... (5 Replies)
there seems not to be error in this segment. In some computers, it can work well. But in others, it will give a failure.
why it ocurrs and how to deal with it?
in a function:
if( *ver == NULL ) {
*ver = (vertex *) malloc(sizeof(vertex)); //this line
... (17 Replies)
I am using a structure defined as follows
struct gene_square
{
double *x;
double *y;
};I have class, with a member function which is a pointer of this type:
gene_square* m_Genes;I am allocating memory in the constructors like this:
m_Genes = new gene_square;
for (ii=0;... (1 Reply)
when i try to use the class i wrote, i either get this:
*** glibc detected *** double free or corruption: 0x40236ff4 ***
and the proccess exits with an error code of 0;
or it segfaults. could someone look at my header file (with imp.) to give me some insight as to why its not working?
... (19 Replies)
hi,
I have made a small C program that make use of malloc and free for processing bitmap images. when i try to run the program, I am getting a error something like
*** glibc detected *** free(): invalid next size (normal): 0x0000000000503e70 ***
I am not sure of which free() is causing this... (1 Reply)