Update object size

Fixes #698
This commit is contained in:
Hadley Wickham 2020-10-04 15:56:36 -05:00
parent 7d6d307e36
commit ec4140a9e5
1 changed files with 1 additions and 1 deletions

View File

@ -129,7 +129,7 @@ y <- rep(x, 1000)
pryr::object_size(y)
```
`y` doesn't take up 1,000x as much memory as `x`, because each element of `y` is just a pointer to that same string. A pointer is 8 bytes, so 1000 pointers to a 136 B string is 8 * 1000 + 136 = 8.13 kB.
`y` doesn't take up 1,000x as much memory as `x`, because each element of `y` is just a pointer to that same string. A pointer is 8 bytes, so 1000 pointers to a 152 B string is 8 * 1000 + 152 = 8.14 kB.
### Missing values