Get the App
SLTechnology News&Howtos  ›  Database  › 

Bin memory Management of Aerospike-column memory Management

Shulou Source: shulou.com Published: 2022-06-01 06:05:59 09月22日 Update

1. Memory request function call

Write_master- > write_master_dim- > write_master_bin_ops

-> write_master_bin_ops_loop- > as_bin_particle_alloc_from_client:

This function requests memory from as_bin_s- > particle and load the relevant bin attributes and values to the

In the requested memory.

2. Memory release function call

As_record_done- > as_record_destroy- > as_record_clean_bins

-> as_record_clean_bins_from

Click (here) to collapse or open

Void as_record_clean_bins_from (as_storage_rd * rd, uint16_t from)

{

For (uint16_t I = from; in _ bins; iTunes +) {

/ / release for each bin

As_bin * b = & rd- > bins [I]

If (as_bin_inuse (b)) {/ / bin state is valid

As_bin_particle_destroy (b, rd- > ns- > storage_data_in_memory)

As_bin_set_empty (b); / / sets the status AS_BIN_STATE_UNUSED of bin

}

}

}

Void as_bin_particle_destroy (as_bin * b, bool free_particle)

{

If (as_bin_is_embedded_particle (b)) {

B-> particle = 0. There is no room for application for the types of set and float. You can do so here.

}

Else if (b-> particle) {

If (free_particle) {

Particle_ vTable [as _ bin_get_particle_type (b)]-> destructor_fn (b-> particle)

}

/ / call the destructor function according to the type. Blob calls blob_destruct, which is actually cf_free (p).

/ / Free the space and set it to 0

B-> particle = 0

}

}

Tags: Memory function space type management validity property state and set Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno vpn NVidia MariaDB macOS Microsoft