Displaying 20 results from an estimated 263 matches for "buf_size".
Did you mean:
wbuf_size
2014 Sep 18
3
patch for win_utf8_io.c: vsnprintf_s vs. MinGW
lvqcl wrote:
> Oops. It seems that vsnprintf_s isn't always available on MinGW platform:
> MinGW declares this function only if MINGW_HAS_SECURE_API macro is defined.
> That's because WinXP version of msvcrt.dll doesn't contain secure functions
> like vsnprintf_s.
>
> Maybe it's better to revert vsnprintf_s to vsprintf or to use vnsprintf?
Ok, we need to drop
2014 Sep 19
0
vsnprintf_s and vsnprintf
...'d prefer vsnprintf
> over vsprintf but have no way of testing any of these options.
I wrote a small program that fills a buffer[] with "abcdefghijklmnopqrstuvwxyz\0"
pattern and then tries to write "0123456789" string into it.
It calls either
ret = vsnprintf_s(buffer, buf_size, _TRUNCATE, fmt, va);
or
ret = vsnprintf(buffer, buf_size, fmt, va);
The results are:
---------------------------------------------------------------------------
vsnprintf_s (MSVC, MinGW):
buf_size = 8; ret = -1; buffer = "0123456"
buf_size = 9; ret = -1;...
2014 Sep 20
2
vsnprintf_s and vsnprintf
lvqcl wrote:
> I wrote a small program that fills a buffer[] with "abcdefghijklmnopqrstuvwxyz\0"
> pattern and then tries to write "0123456789" string into it.
> It calls either
> ret = vsnprintf_s(buffer, buf_size, _TRUNCATE, fmt, va);
> or
> ret = vsnprintf(buffer, buf_size, fmt, va);
<snip>
> vsnprintf (MSVC, MinGW):
>
> buf_size = 8; ret = -1; buffer = "01234567ijklmnopqrstuvwxyz"
> buf_size = 9; ret = -1; buffer = "012345678jklm...
2006 Dec 09
1
New function for manipulating SpeexBits
It would be nice to have the following function added to the speex
bits...
void speex_bits_read_from_buffer(
SpeexBits * const bits,
void * const buff,
const int buf_size)
{
bits->bytes = (char*)buff;
bits->buf_size = buf_size;
bits->nbBits = buf_size << 3;
bits->bytePtr = 0;
bits->bitPtr = 0;
bits->owner = 0;
bits->overflow = 0;
}
... so a bitstream can be assigned to a SpeexBits structure for
proce...
2012 Sep 19
2
[PATCHv2] virtio_console: Add support for remoteproc serial
...-334,20 +382,22 @@ static inline bool use_multiport(struct ports_device *portdev)
return portdev->vdev->features[0] & (1 << VIRTIO_CONSOLE_F_MULTIPORT);
}
-static void free_buf(struct port_buffer *buf)
+static void
+free_buf(struct virtqueue *vq, struct port_buffer *buf, size_t buf_size)
{
- kfree(buf->buf);
+ free_databuf(vq->vdev, buf_size, buf->buf);
kfree(buf);
}
-static struct port_buffer *alloc_buf(size_t buf_size)
+static struct port_buffer *alloc_buf(struct virtqueue *vq, size_t buf_size)
{
struct port_buffer *buf;
buf = kmalloc(sizeof(*buf), GFP_KERN...
2012 Sep 19
2
[PATCHv2] virtio_console: Add support for remoteproc serial
...-334,20 +382,22 @@ static inline bool use_multiport(struct ports_device *portdev)
return portdev->vdev->features[0] & (1 << VIRTIO_CONSOLE_F_MULTIPORT);
}
-static void free_buf(struct port_buffer *buf)
+static void
+free_buf(struct virtqueue *vq, struct port_buffer *buf, size_t buf_size)
{
- kfree(buf->buf);
+ free_databuf(vq->vdev, buf_size, buf->buf);
kfree(buf);
}
-static struct port_buffer *alloc_buf(size_t buf_size)
+static struct port_buffer *alloc_buf(struct virtqueue *vq, size_t buf_size)
{
struct port_buffer *buf;
buf = kmalloc(sizeof(*buf), GFP_KERN...
2012 Sep 20
0
[PATCHv3] virtio_console: Add support for remoteproc serial
...+385,24 @@ static inline bool use_multiport(struct ports_device *portdev)
return portdev->vdev->features[0] & (1 << VIRTIO_CONSOLE_F_MULTIPORT);
}
-static void free_buf(struct port_buffer *buf)
+static void free_buf(struct virtqueue *vq, struct port_buffer *buf,
+ size_t buf_size)
{
- kfree(buf->buf);
+ free_databuf(vq->vdev, buf_size, buf->buf);
kfree(buf);
}
-static struct port_buffer *alloc_buf(size_t buf_size)
+static struct port_buffer *alloc_buf(struct virtqueue *vq, size_t buf_size)
{
struct port_buffer *buf;
buf = kmalloc(sizeof(*buf), GFP_KERN...
2012 Sep 20
0
[PATCHv3] virtio_console: Add support for remoteproc serial
...+385,24 @@ static inline bool use_multiport(struct ports_device *portdev)
return portdev->vdev->features[0] & (1 << VIRTIO_CONSOLE_F_MULTIPORT);
}
-static void free_buf(struct port_buffer *buf)
+static void free_buf(struct virtqueue *vq, struct port_buffer *buf,
+ size_t buf_size)
{
- kfree(buf->buf);
+ free_databuf(vq->vdev, buf_size, buf->buf);
kfree(buf);
}
-static struct port_buffer *alloc_buf(size_t buf_size)
+static struct port_buffer *alloc_buf(struct virtqueue *vq, size_t buf_size)
{
struct port_buffer *buf;
buf = kmalloc(sizeof(*buf), GFP_KERN...
2019 Oct 30
1
[PATCH net-next 07/14] vsock: handle buffer_size sockopts in the core
...ock.h b/include/linux/virtio_vsock.h index
> 96d8132acbd7..b79befd2a5a4 100644
> --- a/include/linux/virtio_vsock.h
> +++ b/include/linux/virtio_vsock.h
> @@ -7,9 +7,6 @@
> #include <net/sock.h>
> #include <net/af_vsock.h>
>
> -#define VIRTIO_VSOCK_DEFAULT_MIN_BUF_SIZE 128
> -#define VIRTIO_VSOCK_DEFAULT_BUF_SIZE (1024 * 256)
> -#define VIRTIO_VSOCK_DEFAULT_MAX_BUF_SIZE (1024 * 256)
> #define VIRTIO_VSOCK_DEFAULT_RX_BUF_SIZE (1024 * 4)
> #define VIRTIO_VSOCK_MAX_BUF_SIZE 0xFFFFFFFFUL
> #define VIRTIO_VSOCK_MAX_PKT_BUF_SIZE (1024 * 64)
> @@...
2019 Oct 09
2
[RFC PATCH 07/13] vsock: handle buffer_size sockopts in the core
...0a2e 100644
> --- a/net/vmw_vsock/virtio_transport_common.c
> +++ b/net/vmw_vsock/virtio_transport_common.c
> @@ -403,17 +403,13 @@ int virtio_transport_do_socket_init(struct vsock_sock *vsk,
> if (psk) {
> struct virtio_vsock_sock *ptrans = psk->trans;
>
> - vvs->buf_size = ptrans->buf_size;
> - vvs->buf_size_min = ptrans->buf_size_min;
> - vvs->buf_size_max = ptrans->buf_size_max;
> vvs->peer_buf_alloc = ptrans->peer_buf_alloc;
> - } else {
> - vvs->buf_size = VIRTIO_VSOCK_DEFAULT_BUF_SIZE;
> - vvs->buf_size_min =...
2019 Oct 09
2
[RFC PATCH 07/13] vsock: handle buffer_size sockopts in the core
...0a2e 100644
> --- a/net/vmw_vsock/virtio_transport_common.c
> +++ b/net/vmw_vsock/virtio_transport_common.c
> @@ -403,17 +403,13 @@ int virtio_transport_do_socket_init(struct vsock_sock *vsk,
> if (psk) {
> struct virtio_vsock_sock *ptrans = psk->trans;
>
> - vvs->buf_size = ptrans->buf_size;
> - vvs->buf_size_min = ptrans->buf_size_min;
> - vvs->buf_size_max = ptrans->buf_size_max;
> vvs->peer_buf_alloc = ptrans->peer_buf_alloc;
> - } else {
> - vvs->buf_size = VIRTIO_VSOCK_DEFAULT_BUF_SIZE;
> - vvs->buf_size_min =...
2014 Sep 20
0
vsnprintf_s and vsnprintf
Erik de Castro Lopo wrote:
>> vsnprintf (MSVC, MinGW):
>>
>> buf_size = 8; ret = -1; buffer = "01234567ijklmnopqrstuvwxyz"
>> buf_size = 9; ret = -1; buffer = "012345678jklmnopqrstuvwxyz"
>> buf_size = 10; ret = 10; buffer = "0123456789klmnopqrstuvwxyz"
>> buf_size = 11;...
2015 Sep 10
3
[PATCH 0/1] efi: DNS resolver
From: Sylvain Gault <sylvain.gault at gmail.com>
Despite having native network capabilities, UEFI 2.4 (the most widely deployed
at the moment) has no native DNS resolver. I propose here an implementation
more or less inspired by the one found in core/legacynet/dnsresolv.c.
Since it's non-trivial, I'd like to ask for a deep review of this code. I tried
to make it as strong as
2004 Aug 06
2
SPEEX_SET_USER_HANDLER once again
...rray index of the corresponding sync structure
int index = speex_bits_unpack_unsigned(bits, 8);
SendNotifyMessage(l_sdthread->m_hWnd, USER_PLAYBACK_MESSAGE,
SYNC_DATA,
LPARAM(index));
return 0;
}
inline int speex_bits_init_buffer_ex(SpeexBits *bits, void *buff, int
buf_size){
if (buff == NULL || buf_size == 0)
return -1;
memset(bits, 0, sizeof(SpeexBits));
bits->bytes = (char*)buff;
bits->buf_size = buf_size;
bits->nbBits=buf_size << 3;
return 0;
}
int CSpeexDecod...
2012 Sep 25
5
[PATCHv6 0/3] virtio_console: Add rproc_serial device
From: Sjur Br?ndeland <sjur.brandeland at stericsson.com>
I thought rebasing rproc_serial to linux-next was going to be trivial.
But when starting the merge I realized that I had to refactor the
the patches from Masami Hiramatsu. The splice support has the same issue
as I faced, with different type of buffers in the out_vq.
So I ended up refactoring the splice functionality. The code
size
2012 Sep 25
5
[PATCHv6 0/3] virtio_console: Add rproc_serial device
From: Sjur Br?ndeland <sjur.brandeland at stericsson.com>
I thought rebasing rproc_serial to linux-next was going to be trivial.
But when starting the merge I realized that I had to refactor the
the patches from Masami Hiramatsu. The splice support has the same issue
as I faced, with different type of buffers in the out_vq.
So I ended up refactoring the splice functionality. The code
size
2019 Oct 11
4
[PATCH v4 1/5] vsock/virtio: limit the memory used per-socket
...ed to do some calculations and
looking better to our credit mechanism:
buf_alloc = 256 KB (default, tunable through setsockopt)
sizeof(struct virtio_vsock_pkt) = 128
- guest (we use preallocated 4 KB buffers to receive packets, copying
small packet - < 128 -)
worst_case = 129
buf_size = 4 KB
credit2mem = (buf_size + sizeof(struct virtio_vsock_pkt)) / worst_case = 32
credit_published = buf_alloc / credit2mem = ~8 KB
Space for just 2 full packet (4 KB)
- host (we copy packets from the vring, allocating the space for the payload)
worst_case = 1
buf_size = 1...
2019 Oct 11
4
[PATCH v4 1/5] vsock/virtio: limit the memory used per-socket
...ed to do some calculations and
looking better to our credit mechanism:
buf_alloc = 256 KB (default, tunable through setsockopt)
sizeof(struct virtio_vsock_pkt) = 128
- guest (we use preallocated 4 KB buffers to receive packets, copying
small packet - < 128 -)
worst_case = 129
buf_size = 4 KB
credit2mem = (buf_size + sizeof(struct virtio_vsock_pkt)) / worst_case = 32
credit_published = buf_alloc / credit2mem = ~8 KB
Space for just 2 full packet (4 KB)
- host (we copy packets from the vring, allocating the space for the payload)
worst_case = 1
buf_size = 1...
2019 Sep 27
0
[RFC PATCH 07/13] vsock: handle buffer_size sockopts in the core
...t,
diff --git a/include/linux/virtio_vsock.h b/include/linux/virtio_vsock.h
index 96d8132acbd7..ab02d119fe79 100644
--- a/include/linux/virtio_vsock.h
+++ b/include/linux/virtio_vsock.h
@@ -7,9 +7,6 @@
#include <net/sock.h>
#include <net/af_vsock.h>
-#define VIRTIO_VSOCK_DEFAULT_MIN_BUF_SIZE 128
-#define VIRTIO_VSOCK_DEFAULT_BUF_SIZE (1024 * 256)
-#define VIRTIO_VSOCK_DEFAULT_MAX_BUF_SIZE (1024 * 256)
#define VIRTIO_VSOCK_DEFAULT_RX_BUF_SIZE (1024 * 4)
#define VIRTIO_VSOCK_MAX_BUF_SIZE 0xFFFFFFFFUL
#define VIRTIO_VSOCK_MAX_PKT_BUF_SIZE (1024 * 64)
@@ -25,11 +22,6 @@ enum {
struc...
2006 May 26
13
win32-dir, unicode
Hi,
I''ve got a preliminary version of the pure Ruby version of win32-dir in
CVS. However, I was hoping to work out the Unicode issue. Run this:
from = "C:\\test"
to = "?????"
Dir.mkdir(from) unless File.exists?(from)
Dir.create_junction(to, from)
It works, but my explorer (and dos) window shows the name garbled. I
don''t think it''s a font