Searched refs:newSize (Results 1 - 25 of 107) sorted by relevance

12345

/haiku/src/system/libroot/posix/unistd/
H A Dtruncate.c19 truncate(const char *path, off_t newSize) argument
24 stat.st_size = newSize;
33 ftruncate(int fd, off_t newSize) argument
38 stat.st_size = newSize;
/haiku/src/add-ons/kernel/file_systems/ramfs/
H A DSymLink.cpp28 SymLink::SetSize(off_t newSize) argument
30 status_t error = (newSize >= 0 && newSize < PATH_MAX ? B_OK : B_BAD_VALUE);
32 if (error == B_OK && newSize < oldSize) {
33 fLinkedPath.Truncate(newSize);
H A DSymLink.h16 virtual status_t SetSize(off_t newSize);
H A DFile.cpp54 File::SetSize(off_t newSize) argument
58 if (newSize != oldSize) {
59 error = DataContainer::Resize(newSize);
H A DFile.h23 virtual status_t SetSize(off_t newSize);
H A DDataContainer.cpp55 DataContainer::Resize(off_t newSize) argument
57 // PRINT("DataContainer::Resize(%Ld), fSize: %Ld\n", newSize, fSize);
60 if (newSize < fSize) {
65 error = fCache->Resize(newSize, VM_PRIORITY_SYSTEM);
71 } else if (newSize > fSize) {
73 if (_RequiresCacheMode(newSize)) {
80 fCache->Resize(newSize, VM_PRIORITY_SYSTEM);
90 fSize = newSize;
H A DAttribute.cpp55 Attribute::SetSize(off_t newSize) argument
59 if (newSize != oldSize) {
63 error = DataContainer::Resize(newSize);
/haiku/headers/posix/
H A Dmalloc.h17 extern void *realloc(void *oldPointer, size_t newSize);
/haiku/src/tests/system/libroot/posix/
H A Dtruncate.cpp35 off_t newSize = strtoll(argv[2], NULL, 0); local
38 printf("wanted %10Ld\n", newSize);
46 if (truncate(argv[1], newSize) != 0) {
58 if (ftruncate(fd, newSize) == 0 || errno != EINVAL) {
/haiku/src/system/runtime_loader/
H A Dutility.h78 size_t newSize = std::max(fMaxSize * 2, size_t(4)); local
79 T* newBuffer = new T[newSize];
85 fMaxSize = newSize;
H A Dheap.cpp198 size_t newSize = (addr_t)chunk - (addr_t)this; local
199 chunk->fSize = fSize - newSize;
202 fSize = newSize;
372 realloc(void* oldBuffer, size_t newSize) argument
374 if (newSize == 0) {
375 TRACE(("realloc(%p, %lu) -> NULL\n", oldBuffer, newSize));
388 if (oldSize >= newSize
389 && (oldSize < 128 || newSize > oldSize / 3)) {
391 oldBuffer, newSize));
396 void* newBuffer = malloc(newSize);
[all...]
/haiku/src/kits/network/libnetapi/
H A DDynamicBuffer.cpp147 size_t newSize;
149 newSize = (fBufferSize + size) * 2;
151 newSize = size;
153 unsigned char* newBuffer = new (std::nothrow) unsigned char[newSize];
164 fBufferSize = newSize;
/haiku/src/kits/app/
H A DLinkSender.cpp231 LinkSender::AdjustBuffer(size_t newSize, char **_oldBuffer) argument
234 if (newSize <= kInitialBufferSize)
235 newSize = kInitialBufferSize;
236 else if (newSize > kMaxBufferSize)
238 else if (newSize > kInitialBufferSize)
239 newSize = (newSize + B_PAGE_SIZE - 1) & ~(B_PAGE_SIZE - 1);
241 if (newSize == fBufferSize) {
249 char *buffer = (char *)malloc(newSize);
259 fBufferSize = newSize;
[all...]
/haiku/src/system/boot/loader/
H A Dheap.cpp321 size_t newSize = (addr_t)chunk - (addr_t)this; local
322 chunk->fSize = fSize - newSize;
325 fSize = newSize;
503 realloc(void* oldBuffer, size_t newSize) argument
505 if (newSize == 0) {
506 TRACE("realloc(%p, %lu) -> NULL\n", oldBuffer, newSize);
520 newSize);
527 if (oldSize >= newSize
528 && (oldSize < 128 || newSize > oldSize / 3)) {
530 oldBuffer, newSize);
[all...]
/haiku/src/system/kernel/vm/
H A DVMKernelAddressSpace.h40 virtual bool CanResizeArea(VMArea* area, size_t newSize);
41 virtual status_t ResizeArea(VMArea* area, size_t newSize,
43 virtual status_t ShrinkAreaHead(VMArea* area, size_t newSize,
45 virtual status_t ShrinkAreaTail(VMArea* area, size_t newSize,
H A DVMUserAddressSpace.h35 virtual bool CanResizeArea(VMArea* area, size_t newSize);
36 virtual status_t ResizeArea(VMArea* area, size_t newSize,
38 virtual status_t ShrinkAreaHead(VMArea* area, size_t newSize,
40 virtual status_t ShrinkAreaTail(VMArea* area, size_t newSize,
/haiku/src/kits/interface/textview_support/
H A DTextGapBuffer.cpp171 uint32 newSize = numChars * charLen;
173 if ((uint32)fScratchSize < newSize) {
174 fScratchBuffer = (char*)realloc(fScratchBuffer, newSize);
175 fScratchSize = newSize;
185 *_numBytes = newSize;
218 uint32 newSize = numChars * bulletCharLen + 1;
220 if ((uint32)fScratchSize < newSize) {
221 fScratchBuffer = (char*)realloc(fScratchBuffer, newSize);
222 fScratchSize = newSize;
/haiku/src/kits/interface/
H A DRegion.cpp480 \fn bool BRegion::_SetSize(int32 newSize)
483 \param newSize The amount of rectangles that the region should be
487 BRegion::_SetSize(int32 newSize) argument
490 newSize = max_c(fDataSize, newSize);
492 if (newSize == fDataSize)
495 // align newSize to multiple of kDataBlockSize
496 newSize = ((newSize + kDataBlockSize - 1) / kDataBlockSize) * kDataBlockSize;
498 if (newSize >
[all...]
/haiku/headers/private/fs_shell/
H A Dfssh_unistd.h57 extern int fssh_ftruncate(int fd, fssh_off_t newSize);
58 extern int fssh_truncate(const char *path, fssh_off_t newSize);
/haiku/src/add-ons/kernel/file_systems/reiserfs/
H A DList.h320 int32 newSize = count; local
321 if (newSize <= 0)
322 newSize = 1;
323 newSize = ((newSize - 1) / fChunkSize + 1) * fChunkSize;
325 if ((size_t)newSize != fCapacity) {
327 = (item_t*)realloc(fItems, newSize * sizeof(item_t));
330 fCapacity = newSize;
/haiku/src/system/libroot/os/
H A Darea.c58 resize_area(area_id id, size_t newSize) argument
60 return _kern_resize_area(id, newSize);
/haiku/headers/private/kernel/util/
H A DMultiHashTable.h155 bool _Resize(size_t newSize) argument
157 ValueType **newTable = new ValueType *[newSize];
161 for (size_t i = 0; i < newSize; i++)
169 _Insert(newTable, newSize, bucket);
177 HashTable::fTableSize = newSize;
/haiku/src/libs/icon/flat_icon/
H A DLittleEndianBuffer.cpp158 size_t newSize = fSize; local
159 while (newSize < neededSize)
160 newSize += CHUNK_SIZE;
163 if (newSize > fSize)
164 _SetSize(newSize);
/haiku/src/kits/storage/
H A DResourceStrings.cpp266 \param newSize the new hash table size
272 BResourceStrings::_Rehash(int32 newSize) argument
275 if (newSize > 0 && newSize != fHashTableSize) {
278 = new(nothrow) _string_id_hash*[newSize];
280 memset(newHashTable, 0, sizeof(_string_id_hash*) * newSize);
286 int32 newPos = entry->id % newSize;
295 fHashTableSize = newSize;
/haiku/src/kits/tracker/
H A DOpenHashTable.h352 int32 newSize = int32(fElementCount * 1.73 * fMaxLoadFactor); local
353 newSize = (fInitialSize > newSize ? fInitialSize : newSize);
354 if (newSize != fArraySize) {
356 int32 *newHashArray = (int32*)calloc(newSize, sizeof(int32));
359 for (int32 index = 0; index < newSize; index++)
369 uint32 hash = (element.Hash() % newSize);
379 fArraySize = newSize;
469 int32 newSize local
[all...]

Completed in 164 milliseconds

12345