From c8faa526b9827728a3de8fdf8955d7bb5256a64b Mon Sep 17 00:00:00 2001 From: brenninc Date: Mon, 22 Jun 2026 07:09:39 +0100 Subject: [PATCH] merge checks to save itcm --- .../weight_dependence/weight_additive_one_term_impl.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/neural_modelling/src/neuron/plasticity/stdp/weight_dependence/weight_additive_one_term_impl.c b/neural_modelling/src/neuron/plasticity/stdp/weight_dependence/weight_additive_one_term_impl.c index ba3d0d4c838..97714df4b28 100644 --- a/neural_modelling/src/neuron/plasticity/stdp/weight_dependence/weight_additive_one_term_impl.c +++ b/neural_modelling/src/neuron/plasticity/stdp/weight_dependence/weight_additive_one_term_impl.c @@ -48,13 +48,12 @@ address_t weight_initialise( plasticity_weight_region_data_t *dtcm_copy = plasticity_weight_region_data = spin1_malloc(sizeof(plasticity_weight_region_data_t) * n_synapse_types); - if (dtcm_copy == NULL) { - log_error("Could not initialise weight region data"); - return NULL; - } weight_shift = spin1_malloc(sizeof(uint32_t) * n_synapse_types); - if (weight_shift == NULL) { + + // combining these two in one check needed to save ITCM + // IZK_cond_exp_dual_stdp_mad_pair_additive overflows + if (dtcm_copy == NULL || weight_shift == NULL) { log_error("Could not initialise weight region data"); return NULL; }