ObjFW  Diff

Differences From Artifact [08ae6bde87]:

To Artifact [84660ce002]:


497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544

/**
 * \brief Allocates memory for the specified number of items and stores it in
 *	  the object's memory pool.
 *
 * It will be free'd automatically when the object is deallocated.
 *
 * \param itemSize The size of each item to allocate
 * \param count The number of items to allocate
 * \return A pointer to the allocated memory
 */
- (void*)allocMemoryWithItemSize: (size_t)itemSize
			   count: (size_t)count;

/**
 * \brief Resizes memory in the object's memory pool to the specified size.
 *
 * If the pointer is NULL, this is equivalent to allocating memory.
 * If the size is 0, this is equivalent to freeing memory.
 *
 * \param pointer A pointer to the already allocated memory
 * \param size The new size for the memory chunk
 * \return A pointer to the resized memory chunk
 */
- (void*)resizeMemory: (void*)pointer
	       toSize: (size_t)size;

/**
 * \brief Resizes memory in the object's memory pool to the specific number of
 *	  items of the specified size.
 *
 * If the pointer is NULL, this is equivalent to allocating memory.
 * If the size or number of items is 0, this is equivalent to freeing memory.
 *
 * \param pointer A pointer to the already allocated memory
 * \param itemSize The size of each item to resize to
 * \param count The number of items to resize to
 * \return A pointer to the resized memory chunk
 */
- (void*)resizeMemory: (void*)pointer
	     itemSize: (size_t)itemSize
		count: (size_t)count;

/**
 * \brief Frees allocated memory and removes it from the object's memory pool.
 *
 * Does nothing if the pointer is NULL.
 *







|



|
|












|









|




|







497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544

/**
 * \brief Allocates memory for the specified number of items and stores it in
 *	  the object's memory pool.
 *
 * It will be free'd automatically when the object is deallocated.
 *
 * \param size The size of each item to allocate
 * \param count The number of items to allocate
 * \return A pointer to the allocated memory
 */
- (void*)allocMemoryWithSize: (size_t)size
		       count: (size_t)count;

/**
 * \brief Resizes memory in the object's memory pool to the specified size.
 *
 * If the pointer is NULL, this is equivalent to allocating memory.
 * If the size is 0, this is equivalent to freeing memory.
 *
 * \param pointer A pointer to the already allocated memory
 * \param size The new size for the memory chunk
 * \return A pointer to the resized memory chunk
 */
- (void*)resizeMemory: (void*)pointer
		 size: (size_t)size;

/**
 * \brief Resizes memory in the object's memory pool to the specific number of
 *	  items of the specified size.
 *
 * If the pointer is NULL, this is equivalent to allocating memory.
 * If the size or number of items is 0, this is equivalent to freeing memory.
 *
 * \param pointer A pointer to the already allocated memory
 * \param size The size of each item to resize to
 * \param count The number of items to resize to
 * \return A pointer to the resized memory chunk
 */
- (void*)resizeMemory: (void*)pointer
		 size: (size_t)size
		count: (size_t)count;

/**
 * \brief Frees allocated memory and removes it from the object's memory pool.
 *
 * Does nothing if the pointer is NULL.
 *