diff options
author | 2016-06-16 00:01:47 +0200 | |
---|---|---|
committer | 2016-06-16 00:01:47 +0200 | |
commit | 404e589cff3123bd146e8339570cd07869b2e91b (patch) | |
tree | 99a1a99e8f061178ff398a30da181184a8621110 /src/lib/netlist/plib/palloc.h | |
parent | 809de6dd7ff20bcb2a214596bb9232825e944524 (diff) |
Merge netlist_dev branch, all code_refactoring: (nw)
Object model optimisation.
Merge remote-tracking branch 'origin/master' into netlist_dev
Fix a merge issue.
#if ==> #elif. Ouch.
Default PHAS_PMF_INTERNAL=0 for 32bit windows mingw.
Change UINT8 to uint_[fast|least|8_t.
Move state_var so it can be used by base devices as well.
Remove last traces of ATTR_ALIGN.
Refactored netlist_time into a template.
Removed implicit double assignment to netlist. Doomed to produce
bugs.
Instead, use netlist_time::from_double.
Switch to using proper (i.e. bool type) param_logic_t.
Formally differentiate between logic inputs (e.g. switches) and int
inputs (e.g. resistor ladders or selection switches).
Added parameter USE_DEACTIVATE to truthtable devices.
Added more constexpr to netlist_time.
Fixed some ifdef code paths.
- More c++.
- Simplify main processing loop. As a nice side-effect that squeezed
out some cycles.
- More cycle squeezing.
- Removed pvector_t.
- Use std::sort.
- Refactored netlist state manager.
- Introduction of state_var object template to be used on device
state
members.
- Changed remaining save occurrences to state_var.
- Rewrote nltool's listdevices command. This allowed removal of one
member from devices which served solely for listdevices.
- Remove hashmap_t. Fix kidniki regression.
Diffstat (limited to 'src/lib/netlist/plib/palloc.h')
-rw-r--r-- | src/lib/netlist/plib/palloc.h | 24 |
1 files changed, 2 insertions, 22 deletions
diff --git a/src/lib/netlist/plib/palloc.h b/src/lib/netlist/plib/palloc.h index 154656602a6..1529cd38194 100644 --- a/src/lib/netlist/plib/palloc.h +++ b/src/lib/netlist/plib/palloc.h @@ -16,26 +16,6 @@ #include "pconfig.h" #include "pstring.h" -#if (PSTANDALONE) -#include <cstddef> -#include <new> - -#if defined(__GNUC__) && (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)) -#if !defined(__ppc__) && !defined (__PPC__) && !defined(__ppc64__) && !defined(__PPC64__) -#define ATTR_ALIGN __attribute__ ((aligned(64))) -#else -#define ATTR_ALIGN -#endif -#else -#define ATTR_ALIGN -#endif - -#else - -#define ATTR_ALIGN - -#endif - namespace plib { //============================================================ @@ -171,8 +151,8 @@ private: struct block { block() : m_num_alloc(0), m_free(0), cur_ptr(nullptr), data(nullptr) { } - int m_num_alloc; - int m_free; + std::size_t m_num_alloc; + std::size_t m_free; char *cur_ptr; char *data; }; |