Added ReadSegments and WriteSegments to nsIBuffer to avoid the need to allocate intermediate buffers.

git-svn-id: svn://10.0.0.236/trunk@34369 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
warren%netscape.com
1999-06-09 04:52:47 +00:00
parent 7dc5c992ea
commit 14d73e7f5b
4 changed files with 195 additions and 2 deletions

View File

@@ -168,7 +168,23 @@ main(int argc, char* argv[])
return -1;
}
#endif
rv = NS_NewPipe2(&in, &out, 4096, 4096 * 4);
// test for small buffers
rv = NS_NewPipe2(&in, &out, 12, 24);
if (NS_FAILED(rv)) {
printf("NewPipe failed\n");
return -1;
}
rv = TestPipe(in, out);
NS_RELEASE(in);
NS_RELEASE(out);
if (NS_FAILED(rv)) {
printf("TestPipe failed\n");
return -1;
}
// test for large buffers
rv = NS_NewPipe2(&in, &out, 4096, 4096*16);
if (NS_FAILED(rv)) {
printf("NewPipe failed\n");
return -1;