mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-03-21 22:34:51 -07:00
[MPS] Allocate shelved bidi caches ambiguously
* src/bidi.c (bidi_shelve_cache) [MPS]: Use 'igc_xzalloc_ambig'. (bidi_unshelve_cache) [MPS]: Use 'igc_xfree'.
This commit is contained in:
parent
792534a655
commit
3b01c2ca8e
1 changed files with 9 additions and 0 deletions
|
|
@ -246,6 +246,7 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */
|
|||
#include "dispextern.h"
|
||||
#include "region-cache.h"
|
||||
#include "sysstdio.h"
|
||||
#include "igc.h"
|
||||
|
||||
static bool bidi_initialized = 0;
|
||||
|
||||
|
|
@ -996,7 +997,11 @@ bidi_shelve_cache (void)
|
|||
|
||||
alloc = (bidi_shelve_header_size
|
||||
+ bidi_cache_idx * sizeof (struct bidi_it));
|
||||
#ifdef HAVE_MPS
|
||||
databuf = igc_xzalloc_ambig (alloc);
|
||||
#else
|
||||
databuf = xmalloc (alloc);
|
||||
#endif
|
||||
bidi_cache_total_alloc += alloc;
|
||||
|
||||
memcpy (databuf, &bidi_cache_idx, sizeof (bidi_cache_idx));
|
||||
|
|
@ -1095,7 +1100,11 @@ bidi_unshelve_cache (void *databuf, bool just_free)
|
|||
+ bidi_cache_idx * sizeof (struct bidi_it));
|
||||
}
|
||||
|
||||
#ifdef HAVE_MPS
|
||||
igc_xfree (p);
|
||||
#else
|
||||
xfree (p);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue