Mercurial > vim
comparison src/blob.c @ 28289:cdaff4db7760 v8.2.4670
patch 8.2.4670: memory allocation failures for new tab page not tested
Commit: https://github.com/vim/vim/commit/72bb47e38f6805050ed6d969f17591bed71f83d4
Author: Yegappan Lakshmanan <yegappan@yahoo.com>
Date: Sun Apr 3 11:22:38 2022 +0100
patch 8.2.4670: memory allocation failures for new tab page not tested
Problem: Memory allocation failures for new tab page not tested.
Solution: Add tests with failing memory allocation. (Yegappan Lakshmanan,
closes #10067)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 03 Apr 2022 12:30:03 +0200 |
parents | 41e0dcf38521 |
children | fd855ad74887 |
comparison
equal
deleted
inserted
replaced
28288:a044daf370c5 | 28289:cdaff4db7760 |
---|---|
20 * Caller should take care of the reference count. | 20 * Caller should take care of the reference count. |
21 */ | 21 */ |
22 blob_T * | 22 blob_T * |
23 blob_alloc(void) | 23 blob_alloc(void) |
24 { | 24 { |
25 blob_T *blob = ALLOC_CLEAR_ONE(blob_T); | 25 blob_T *blob = ALLOC_CLEAR_ONE_ID(blob_T, aid_blob_alloc); |
26 | 26 |
27 if (blob != NULL) | 27 if (blob != NULL) |
28 ga_init2(&blob->bv_ga, 1, 100); | 28 ga_init2(&blob->bv_ga, 1, 100); |
29 return blob; | 29 return blob; |
30 } | 30 } |