Forum: C Aug 26th, 2009 |
| Replies: 17 Views: 672 I've somehow managed to fix that error through a sequence of attempts but cant figure out what fixed it. :| But the error was actually in another malloc. thanks to valgrind.
I'm stuck in another... |
Forum: C Aug 26th, 2009 |
| Replies: 17 Views: 672 Thanks.I'll try them both. |
Forum: C Aug 26th, 2009 |
| Replies: 17 Views: 672 wow..ok..the malloc casting was out of habit.I'll stop doing that
Second, are these the ONLY malloc calls in your code, or are there others?
> The WriteRiff function is in a separate program that... |
Forum: C Aug 25th, 2009 |
| Replies: 17 Views: 672 that doesnt seem to be the problem. The input to the function short int *waveform was initialized in a similar manner.It didnt cause a problem. |
Forum: C Aug 25th, 2009 |
| Replies: 17 Views: 672 I've included stdlib,no problem there.
Yes.It is an array of short ints
Here is the entire function
RiffWaveFile and RiffHeader are structures as follows. |
Forum: C Aug 21st, 2009 |
| Replies: 17 Views: 672 |
Forum: C Aug 21st, 2009 |
| Replies: 17 Views: 672 Hi,
I need an array of approx. 2,00,000 elements.But malloc fails to allocate beyond 65872.
When I give
(short int*)malloc(sizeof(short int)*65000);
It works but seg faults when I give
(short... |