Displaying 11 results from an estimated 11 matches for "_iofbf".
2015 Dec 10
5
Windows file buffering
...?p=flac.git;a=commitdiff;h=e8632477774f56b4fe7ccab525cad2ceab244b8a>
the current code:
#ifdef _WIN32
/*
* Windows can suffer quite badly from disk fragmentation. This can be
* reduced significantly by setting the output buffer size to be 10MB.
*/
setvbuf(file, NULL, _IOFBF, 10*1024*1024);
#endif
LRN <lrn1986 at gmail.com> wrote:
> The commit mentioned in the feature request should not cause such
> behaviour, as it only does short-lived operations (opens a file, does
> stuff, closes the file immediately after) and is clearly distinguishing
> betwe...
2015 Dec 10
0
Windows file buffering
...2ceab244b8a>
>
>
> the current code:
>
> #ifdef _WIN32
> /*
> * Windows can suffer quite badly from disk fragmentation. This
> can be
> * reduced significantly by setting the output buffer size to be
> 10MB.
> */
> setvbuf(file, NULL, _IOFBF, 10*1024*1024);
> #endif
>
>
> LRN <lrn1986 at gmail.com> wrote:
>
>> The commit mentioned in the feature request should not cause such
>> behaviour, as it only does short-lived operations (opens a file, does
>> stuff, closes the file immediately after) and is...
2014 Sep 23
4
Disk fragmentation
...oder.c
index 6f46d78..bd95634 100644
--- a/src/libFLAC/stream_encoder.c
+++ b/src/libFLAC/stream_encoder.c
@@ -1288,6 +1288,8 @@ static FLAC__StreamEncoderInitStatus
init_FILE_internal_(
if(file == stdout)
file = get_binary_stdout_(); /* just to be safe */
+ setvbuf(file, NULL, _IOFBF, 10*1024*1024); /* 10MB output buffer to
help reduce disk fragmentation */
+
encoder->private_->file = file;
encoder->private_->progress_callback = progress_callback;
2014 Sep 25
2
Patch to add buffering to decoding too
...decode.c
index 5e5e17a..9e9405c 100644
--- a/src/flac/decode.c
+++ b/src/flac/decode.c
@@ -251,6 +251,7 @@ FLAC__bool DecoderSession_construct(DecoderSession *d, FLAC__bool is_ogg, FLAC__
DecoderSession_destroy(d, /*error_occurred=*/true);
return false;
}
+ setvbuf(d->fout, NULL, _IOFBF, 10*1024*1024); /* 10MB output buffer to help reduce disk fragmentation */
}
}
2012 Sep 19
1
[PATCH 1/1] lua: Enabling io.read() in Lua.c32 with some restrictions
...SEEK_END};
static const char *const modenames[] = {"set", "cur", "end", NULL};
@@ -456,8 +471,9 @@ static int f_seek (lua_State *L) {
return 1;
}
}
+#endif
-
+#ifndef NO_F_SETVBUF
static int f_setvbuf (lua_State *L) {
static const int mode[] = {_IONBF, _IOFBF, _IOLBF};
static const char *const modenames[] = {"no", "full", "line", NULL};
@@ -488,8 +504,8 @@ static const luaL_Reg iolib[] = {
{"open", io_open},
{"output", io_output},
{"popen", io_popen},
-#ifndef SYSLINUX
{"rea...
2014 Apr 09
0
[klibc:master] fwrite: use memrchr() to find the final ' \n' in _IOLBF mode
...e_t bytes = 0;
size_t pf_len, pu_len;
const char *p = buf;
+ const char *q;
/* We divide the data into two chunks, flushed (pf)
and unflushed (pu) depending on buffering mode
@@ -67,23 +68,16 @@ size_t _fwrite(const void *buf, size_t count, FILE *file)
switch (f->bufmode) {
case _IOFBF:
pf_len = 0;
- pu_len = count;
break;
case _IOLBF:
- pf_len = count;
- pu_len = 0;
-
- while (pf_len && p[pf_len-1] != '\n') {
- pf_len--;
- pu_len++;
- }
+ q = memrchr(p, '\n', count);
+ pf_len = q ? q - p + 1 : 0;
break;
case _IONBF:
default:...
2015 Dec 10
2
Windows file buffering
lvqcl,
Would you be able to have alook at this one? I think its
Windows related:
https://sourceforge.net/p/flac/feature-requests/114/
Erik
--
----------------------------------------------------------------------
Erik de Castro Lopo
http://www.mega-nerd.com/
2014 Sep 26
0
Patch to add buffering to decoding too
...sion, outfilename))
return DecoderSession_finish_error(&decoder_session);
return DecoderSession_finish_ok(&decoder_session);
@@ -252,6 +252,7 @@ FLAC__bool DecoderSession_construct(DecoderSession *d, FLAC__bool is_ogg, FLAC__
return false;
}
}
+ setvbuf(d->fout, NULL, _IOFBF, 10*1024*1024); /* 10MB output buffer to help reduce disk fragmentation */
}
if(analysis_mode)
@@ -317,7 +318,7 @@ FLAC__bool DecoderSession_init_decoder(DecoderSession *decoder_session, const ch
return true;
}
-FLAC__bool DecoderSession_process(DecoderSession *d)
+FLAC__bool DecoderSess...
2005 Aug 28
1
monitoring with mrtg
Dear freinds,
The pl script file which is available in the asterisk
monitoring section of the voip-info.com expects
username ,password and host parameters .
Which one we should provied is the acconts we
registered for asterisk or any thing else
your help will be immensely appreciated .
with regards
rk
_______________________________________________________
Too much spam in your inbox?
2012 May 31
1
klibc 2.0 release
...tc implementation
[klibc] Make __parse_open_mode handle "e" for O_CLOEXEC
[klibc] Move _IO_file_flags from stdio.h to stdioint.h
[klibc] Add zalloc() function
[klibc] Restructure the FILE object to allow simple inlines
[klibc] Fix confusion between _IONBF and _IOFBF
[klibc] Make byte counters in stdio unsigned
[klibc] fflush: discard input data
[klibc] fseek: report error on fflush() failure
[klibc] f[d]open: don't bother setting input buffer
[klibc] Add rewind() function
[klibc] fgets: shave a few bytes off
[klibc...
2013 Jul 15
21
[PATCH 00 of 21 RESEND] blktap3/drivers: Introduce tapdisk server.
This patch series copies the core of the tapdisk process from blktap2, with
updates coming from blktap2.5.
Signed-off-by: Thanos Makatos <thanos.makatos@citrix.com>