element.length = length;
element.is_copy = TRUE;
- element.data = malloc (element.length);
+ element.data = _cairo_malloc (element.length);
if (unlikely (element.data == NULL))
return _cairo_error (CAIRO_STATUS_NO_MEMORY);
{
cff_dict_operator_t *op;
- op = malloc (sizeof (cff_dict_operator_t));
+ op = _cairo_malloc (sizeof (cff_dict_operator_t));
if (unlikely (op == NULL))
return _cairo_error (CAIRO_STATUS_NO_MEMORY);
_cairo_dict_init_key (op, operator);
- op->operand = malloc (size);
+ op->operand = _cairo_malloc (size);
if (unlikely (op->operand == NULL)) {
free (op);
return _cairo_error (CAIRO_STATUS_NO_MEMORY);
op = _cairo_hash_table_lookup (dict, &key.base);
if (op != NULL) {
free (op->operand);
- op->operand = malloc (size);
+ op->operand = _cairo_malloc (size);
if (unlikely (op->operand == NULL))
return _cairo_error (CAIRO_STATUS_NO_MEMORY);
len -= 7;
}
}
- font->ps_name = malloc (len + 1);
+ font->ps_name = _cairo_malloc (len + 1);
if (unlikely (font->ps_name == NULL))
return _cairo_error (CAIRO_STATUS_NO_MEMORY);
cairo_status_t status;
font->num_fontdicts = 1;
- font->fd_dict = malloc (sizeof (cairo_hash_table_t *));
+ font->fd_dict = _cairo_malloc (sizeof (cairo_hash_table_t *));
if (unlikely (font->fd_dict == NULL))
return _cairo_error (CAIRO_STATUS_NO_MEMORY);
return _cairo_error (CAIRO_STATUS_NO_MEMORY);
}
- font->fd_subset_map = malloc (sizeof (int));
+ font->fd_subset_map = _cairo_malloc (sizeof (int));
if (unlikely (font->fd_subset_map == NULL))
return _cairo_error (CAIRO_STATUS_NO_MEMORY);
- font->private_dict_offset = malloc (sizeof (int));
+ font->private_dict_offset = _cairo_malloc (sizeof (int));
if (unlikely (font->private_dict_offset == NULL))
return _cairo_error (CAIRO_STATUS_NO_MEMORY);
if (unlikely (status))
return status;
} else {
- font->private_dict_offset = malloc (sizeof (int));
+ font->private_dict_offset = _cairo_malloc (sizeof (int));
if (unlikely (font->private_dict_offset == NULL))
return _cairo_error (CAIRO_STATUS_NO_MEMORY);
}
/* If the PS name is not found, create a CairoFont-x-y name. */
if (font->ps_name == NULL) {
- font->ps_name = malloc (30);
+ font->ps_name = _cairo_malloc (30);
if (unlikely (font->ps_name == NULL))
return _cairo_error (CAIRO_STATUS_NO_MEMORY);
font->font_name = NULL;
font->is_opentype = FALSE;
font->data_length = data_length;
- font->data = malloc (data_length);
+ font->data = _cairo_malloc (data_length);
if (unlikely (font->data == NULL))
return _cairo_error (CAIRO_STATUS_NO_MEMORY);
cff_subset->ascent = (double)font->ascent/font->units_per_em;
cff_subset->descent = (double)font->descent/font->units_per_em;
- cff_subset->data = malloc (length);
+ cff_subset->data = _cairo_malloc (length);
if (unlikely (cff_subset->data == NULL)) {
status = _cairo_error (CAIRO_STATUS_NO_MEMORY);
goto fail4;
(status = backend->load_truetype_table (scaled_font, TT_TAG_CFF,
0, NULL, &data_length)) == CAIRO_INT_STATUS_SUCCESS)
{
- data = malloc (data_length);
+ data = _cairo_malloc (data_length);
if (unlikely (data == NULL)) {
status = _cairo_error (CAIRO_STATUS_NO_MEMORY);
return FALSE;
(status = backend->load_type1_data (scaled_font,
0, NULL, &data_length)) == CAIRO_INT_STATUS_SUCCESS)
{
- data = malloc (data_length);
+ data = _cairo_malloc (data_length);
if (unlikely (data == NULL)) {
status = _cairo_error (CAIRO_STATUS_NO_MEMORY);
return FALSE;
cairo_status_t status;
cairo_cff_font_t *font;
- font = malloc (sizeof (cairo_cff_font_t));
+ font = _cairo_malloc (sizeof (cairo_cff_font_t));
if (unlikely (font == NULL))
return _cairo_error (CAIRO_STATUS_NO_MEMORY);
if (unlikely (status))
return status;
} else {
- font->private_dict_offset = malloc (sizeof (int));
+ font->private_dict_offset = _cairo_malloc (sizeof (int));
if (unlikely (font->private_dict_offset == NULL))
return _cairo_error (CAIRO_STATUS_NO_MEMORY);
}
cff_subset->ascent = (double)type2_subset.y_max/1000;
cff_subset->descent = (double)type2_subset.y_min/1000;
- cff_subset->data = malloc (length);
+ cff_subset->data = _cairo_malloc (length);
if (unlikely (cff_subset->data == NULL)) {
status = _cairo_error (CAIRO_STATUS_NO_MEMORY);
goto fail4;