aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/memline_defs.h
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2021-02-06 17:09:06 -0500
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2021-02-06 17:30:47 -0500
commitbea99729dd66a1d3c5351cbe6a7677df0619a33f (patch)
tree2beaf5430e075a93be4543394b2eec924c8830c9 /src/nvim/memline_defs.h
parent336eb70822970cea6797251043158ee6bd76bc69 (diff)
downloadrneovim-bea99729dd66a1d3c5351cbe6a7677df0619a33f.tar.gz
rneovim-bea99729dd66a1d3c5351cbe6a7677df0619a33f.tar.bz2
rneovim-bea99729dd66a1d3c5351cbe6a7677df0619a33f.zip
vim-patch:8.1.2285: padding in structures wastes memory
Problem: Padding in structures wastes memory. Solution: Move fields to avoid padding. (Dominique Pelle, closes vim/vim#5202) https://github.com/vim/vim/commit/d6beab0248cdb0b7073e97d98d65de7138cb3386 Skip "ml_line_len" member of "struct memline". Patch v8.1.0579 was not ported.
Diffstat (limited to 'src/nvim/memline_defs.h')
-rw-r--r--src/nvim/memline_defs.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nvim/memline_defs.h b/src/nvim/memline_defs.h
index 9a6f29a908..dc4755f83d 100644
--- a/src/nvim/memline_defs.h
+++ b/src/nvim/memline_defs.h
@@ -45,16 +45,16 @@ typedef struct memline {
memfile_T *ml_mfp; // pointer to associated memfile
+ infoptr_T *ml_stack; // stack of pointer blocks (array of IPTRs)
+ int ml_stack_top; // current top of ml_stack
+ int ml_stack_size; // total number of entries in ml_stack
+
#define ML_EMPTY 1 // empty buffer
#define ML_LINE_DIRTY 2 // cached line was changed and allocated
#define ML_LOCKED_DIRTY 4 // ml_locked was changed
#define ML_LOCKED_POS 8 // ml_locked needs positive block number
int ml_flags;
- infoptr_T *ml_stack; // stack of pointer blocks (array of IPTRs)
- int ml_stack_top; // current top of ml_stack
- int ml_stack_size; // total number of entries in ml_stack
-
linenr_T ml_line_lnum; // line number of cached line, 0 if not valid
char_u *ml_line_ptr; // pointer to cached line
size_t ml_line_offset; // cached byte offset of ml_line_lnum