Displaying 5 results from an estimated 5 matches for "allocbuffer".
1999 Oct 13
3
main/character.c (et.al): dangerous AllocBuffer()
I was hit by ugly crashes of R, when I tried to read big data sets ("volcano").
So I looked into the code and found the following in character.c (triggered by substr()):
I assume that the helper function AllocBuffer() shall facilitate an economic memory management. But 
the use of realloc() in the else-branch does not conform to ANSI and may hit you with certain 
compilers.
When called with len<0 the code is assumed to re-size buff to MAXELTSIZE:
	realloc(buff, 0);
	buff = (char *) realloc(buff, MAXELTSIZ...
1999 Oct 13
3
main/character.c (et.al): dangerous AllocBuffer()
I was hit by ugly crashes of R, when I tried to read big data sets ("volcano").
So I looked into the code and found the following in character.c (triggered by substr()):
I assume that the helper function AllocBuffer() shall facilitate an economic memory management. But 
the use of realloc() in the else-branch does not conform to ANSI and may hit you with certain 
compilers.
When called with len<0 the code is assumed to re-size buff to MAXELTSIZE:
	realloc(buff, 0);
	buff = (char *) realloc(buff, MAXELTSIZ...
2004 Dec 30
2
echo cancellation
...ort*  cancelledSample; //the ouput without echo
int*      cancelledSpectrum; //output cancelled spectrum
//now i assume that i should initialise everything like that:
SpeexEchoState* pechoState = speex_echo_state_init(160,x*160); //do the 
second parameter need to be a multiple of the frame size?
AllocBuffers(SpeakerSample,microphoneSample,cancelledSample,cancelledSpectrum);
do{
captureSpeaker(speakerSample);
captureMicrophone(microphoneSample);
speex_echo_cancel(pechoState, microphoneSample, speakerSample, 
cancelledSample, cancelledSpectrum);
while (!keypressed());
---------------------------------...
2004 Dec 30
0
echo cancellation
...without echo
> int*      cancelledSpectrum; //output cancelled spectrum
> 
> //now i assume that i should initialise everything like that:
> 
> SpeexEchoState* pechoState = speex_echo_state_init(160,x*160); //do the 
> second parameter need to be a multiple of the frame size?
> AllocBuffers(SpeakerSample,microphoneSample,cancelledSample,cancelledSpectrum);
> 
> do{
> captureSpeaker(speakerSample);
> captureMicrophone(microphoneSample);
> speex_echo_cancel(pechoState, microphoneSample, speakerSample, 
> cancelledSample, cancelledSpectrum);
> while (!keypressed());...
2006 Jul 05
2
Procmail patch for dovecot delivery
...own user";
 	      nlog(unkuser);logqnl(chp2);syslog(LOG_ERR,slogstr,unkuser,chp2);
 	      return EX_NOUSER;			/* we don't handle strangers */
@@ -498,12 +513,12 @@
 	setuid(uid);			   /* make sure we have enough space */
 	if(linebuf<(len=strlen(chp)+strlen(lockext)+UNIQnamelen))
 	   allocbuffers(linebuf=len,1);	   /* to perform the lock & delivery */
-	if(writefolder(chp,(char*)0,themail.p,filled,0,1))	  /* default */
+	if(writefolder(chp,(char*)0,themail.p,filled,0,1,1))	  /* default */
 	   succeed=1;
       }						       /* if all else failed */
      if(!succeed&&*(chp2=(c...